Open PDF file in VB 6.0

5 pts.
Tags:
PDF Files
VB 6.0
How to open PDF file in VB 6.0 using foxit reader?
ASKED: February 6, 2013  8:45 AM
UPDATED: March 17, 2014  3:44 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Locate the file in question, put you mouse on it and then use the “Open with” and choose the program that you want to open it with.  If the parameters are correct, then you should be able to see it.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    @Harisheldon, VB 6.0 is a programming language, not an application, so the OP is most likely asking about how to code a VB program to open a PDF file.lizganda:  There are at least two easy ways to do that:  First one:  You need to specify the path to the adobe reader application:
    Private Sub Command1_Click()
    Dim path As String
    Dim file As String
    
    path = "C:\Adobe3\Reader\AcroRd32.exe"
    file = "C:\test.pdf"
    Shell path & " " & file, vbNormalFocus
    End Sub
    
    The second one: You don't need to specify the path to the reader, but you need to declare an external function:
    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
     
    Private Sub Command1_Click()
    Dim file As String
    
    file = "C:\test.pdf"
    ShellExecute 0&, "open", file, "", "", vbNormalFocus
    End Sub
    65,110 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following