Tech Support Forum banner

Help on VB6 - open .pdf with wildcard!?

3031 Views 0 Replies 1 Participant Last post by  evo915
Hi there, i hope someone can help!!!?

I'm using the below code to open a Adobe Acrobat reader file (.pdf), but i don't want to specify the location as when the .exe is created and put on CD i won't know which drive the file is located on (e.g. c:, d:, e: etc.?)! (hope that make sense) so basically i need a working wild card for the file location!

Private Sub Label2_Click()
Dim App, Doc As Object
Set App = CreateObject("AcroExch.App")
Set Doc = CreateObject("AcroExch.AVDoc")
App.Show
Doc.Open "C:\folder1\folder2\file1.pdf", "file1.pdf"
End Sub

Any help is appreciated.

Thanks
Andy
Status
Not open for further replies.
1 - 1 of 1 Posts
1 - 1 of 1 Posts
Status
Not open for further replies.
Top