nany
08-08-2007, 12:59 AM
FollowHYperlink
Hello
I've an excell file with all the documents that I need, for my job. For each document, i've a hyperlink. It works, but i'm trying to use the expression"Followhyperlink" to open each document that I want, by selecting with the mouse ,the row were my document is descrived and than by clicking in a commandbutton, the document will appears.
I've all the documents in one folder (D:\S?lvia\TEST\).
For now, what I have done it's this:
Sub OpenFileOrFolder()
Dim strPDFFile As String, strFolder As String
strFolder = "D:\S?lvia\TEST\"
strPDFFile = strFolder & "Test_1_0_0_2000.pdf"
strPDFFile = strFolder & "Test_2_0_0_2000.pdf"
strPDFFile = strFolder & "Test_3_0_0_2000.pdf"
'Open Folder
ActiveWorkbook.FollowHyperlink Address:=strFolder, NewWindow:=True
'Open PDF file
ActiveWorkbook.FollowHyperlink Address:=strPDFFile, NewWindow:=True
'************************************************************************** ****
End Sub
And it doesn't work!!
Can anybody help me?
Thanks
Hello
I've an excell file with all the documents that I need, for my job. For each document, i've a hyperlink. It works, but i'm trying to use the expression"Followhyperlink" to open each document that I want, by selecting with the mouse ,the row were my document is descrived and than by clicking in a commandbutton, the document will appears.
I've all the documents in one folder (D:\S?lvia\TEST\).
For now, what I have done it's this:
Sub OpenFileOrFolder()
Dim strPDFFile As String, strFolder As String
strFolder = "D:\S?lvia\TEST\"
strPDFFile = strFolder & "Test_1_0_0_2000.pdf"
strPDFFile = strFolder & "Test_2_0_0_2000.pdf"
strPDFFile = strFolder & "Test_3_0_0_2000.pdf"
'Open Folder
ActiveWorkbook.FollowHyperlink Address:=strFolder, NewWindow:=True
'Open PDF file
ActiveWorkbook.FollowHyperlink Address:=strPDFFile, NewWindow:=True
'************************************************************************** ****
End Sub
And it doesn't work!!
Can anybody help me?
Thanks