Printing Word Document from Hyperlink -- Can't get the full path!!! Please Help
I am trying to print a Word document using the address found in
a Hyperlink but I can't get the hyperling full path!!!
I want to get rid of the hardcoded "D:\Excel\Matrice\"
Can someone help me?
Thanks!
Here's the working code...
Dim oAppWord As Object
Dim sFiche As String
Dim sChemin As String
' -- I want to get rid of this line...
sChemin = "D:\Excel\Matrice\"
' ------------------------------------
sFiche = Range("B5").Hyperlinks(1).Address
Set oAppWord = CreateObject("Word.Application")
oAppWord.Documents.Open Filename:=sChemin & sFiche
With oAppWord.ActiveDocument
.PrintOut
.Close
End With
|