Since this has been here for 8 hours, here are some suggestions:
Must ask how necessary it is to open the PDF "in" vb6.
If you can use vb6 to open a PDF in Adobe the Shell Execute API offers some possibilities to open and print PDF. A bit of searching might get you on the right track.
Also I see an Adobe Acrobat 8.0 library and Adobe Reader File Preview Type Library in my (very old) references, but know nothing about them. Again perhaps a search for these specific references might turn up some code for you.
It appears some of these issues are addressed on the Adobe discussion boards.
I don't know what your search criteria is but you might try doing it backward like: AutoCad in VB6 etc.
After much searching (only because it is an interesting topic) I have found that there is such a thing as an Adobe.OCX that can be downloaded, regestered, selected in components and placed on your form from the tool box. However it would be for private use (can't distribute with your application) and I can't find a download site that I trust.
Second best (works for me and does not require any special Declaration, Reference or Component) is to use Shell:
Program Files: you will have to look for the version of the reader on your machine (10.0 in my case).
Also I would guess that if you have AutoCad installed you should be able to open task manager then start AutoCad and find the Process that runs AutoCad. This process will replace the "AcroRd32.exe" and of course you will need to set path to the folder where that process (exe) resides
I hope that helps
Sure. Just substitute the Text.Text for the path or file name. Another possibility that reads a little easier is to declare a String variable and build the path from the different sources, then use the variable in the Shell call
Dim MyString as String
MyString = MyApplication.Text & " " & MyPDFFile.Text & "," & "VBNormalFocus"
By the way, I get a fault code when opening the PDF. It may just be my Vista that doesn't like me using a computer at all. You might be able to head it off with an error handler.
Well this code working with my form Shell "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe" & " " & "C:\PathToYourPDF.pdf", vbNormalFocus
but when i added the following code
Dim MyString as StringMyString = textfield.text` Shell "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe" & " " & "C:\textfield.text.pdf", vbNormalFocus
its open a reader with error cant open the file ,, any help plz??
Take the quotes off the Textfield.Text
And put the C: and the .pdf in the text box with the rest of the path.
That works for me. Inline Code Example Here
Should be one of the following