Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display PDF files

Status
Not open for further replies.
Oct 5, 1999
105
GB
Now that Adobe have made acropdf.dll not work in VB6, has anyone found an alternative solution for displaying the contents of a PDF file?

I've got several old vb6 progs that create PDF's and then used acroPDF to display them that no longer work, but I can't find an alternative without spending megabucks.

Any ideas?
 
I have this code in a standard Module:

Code:
Option Explicit

Public Sub OpenDocument(strDocPath As String)
Dim G As Long
G = Shell("RUNDLL32.EXE URL.DLL,FileProtocolHandler " & strDocPath, vbNormalFocus)
End Sub

So if I want to open any file with the default program associated with that file type, I just pass the full path with the file name and extension to that Sub:
[tt]
Call OpenDocument("C:\Temp\SomeFile.pdf")
[/tt]
So whatever you use right now to open your PDF, this code will do the same.


---- Andy

There is a great need for a sarcasm font.
 
Yes that could work, but I prefer to display the PDF in a control on my form, so that I can include sort/filter options on the form to regenerate the report and redisplay it.
 
This page purports to have example code that continues to allow use of acroPDF in VB6. Have not tried it myself, though, but basically it embeds a latest-version-of-IE webbrowser control on your form, and loads the PDF into that
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top