×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Display PDF files

Display PDF files

Display PDF files

(OP)
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?

RE: Display PDF files

I have this code in a standard Module:

CODE --> Module

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:

Call OpenDocument("C:\Temp\SomeFile.pdf")

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.

RE: Display PDF files

(OP)
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.

RE: Display PDF files

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close