哪为大侠知道如何在程序中调用Adobe Acrobat Reader打开Adobe Acrobat Reader格式的文件?THANKS A LOT!

解决方案 »

  1.   

    Option Explicit
    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 LongPrivate Sub Command1_Click()
    ShellExecute Me.hwnd, "open", "pdf文件路径及文件名", vbNullString, vbNullString, 5
    End Sub
      

  2.   

    ' 上面的方法是调用默认的.pdf文件的关联程序打开.pdf文件
    ' 下面的方法是强制用AcroBat Reader打开.pdf文件, 但要知道AcroBat Reader装在哪了Option Explicit
    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 LongPrivate Sub Command1_Click()
    ShellExecute Me.hwnd, "", ".pdf文件路径及文件名", "AcroBat Reader程序路径及程序文件名", vbNullString, 5
    End Sub