VB 6.0 - How to open PDF files using Acrobat.AcroPDDoc

Asked By bhanu priya
04-Feb-10 06:27 AM

Dim adAcrobatApp As New Acrobat.AcroPDDoc

Dim adAcrobatDoc As Object

The above two lines i declare in genral

If InStr(1, filename, ".pdf") > 0 Then
      If Not (adAcrobatDoc Is Nothing) Then
         MsgBox " Aplication is already running"
         adAcrobatApp.Open (filename)
         Exit Sub
      ElseIf adAcrobatDoc Is Nothing Then
            MsgBox "Application not running"
          Set adAcrobatDoc = CreateObject("AcroExch.PDDoc")
          MsgBox filename
          adAcrobatApp.Open (filename)
         
      End If

This the code i written my porblem is iam getting the adobe window but its showing the file doesnot exsisit

and later few seconds debug msg that Runtime error:429 ActivexComponet can't create object so kindly help me how to resolve this issue

Thanks In advance

 

  Web Star replied to bhanu priya
04-Feb-10 06:40 AM

It is important to realize that Adobe Reader is not the same thing as Acrobat. If you are reading documentation, be sure you note which one (or both) it is talking about.

Developing with Acrobat, or Reader, should not rely on an object browser; be sure to use the Acrobat SDK. The object models are complicated. If Acrobat had been installed and your example had worked, the document opened would have been invisible because you did not open an AVDoc as well.

http://forum.planetpdf.com/wb/default.asp?action=9&read=62107&fid=133

  Lalit M. replied to bhanu priya
04-Feb-10 06:55 AM
File path should come immediately after the programm path:"C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe D:\test.pdf"

Try it with a local path, if it works try with a static server path and then a dynamic one to be able to localize the error source. If you use variables, watch their values by debugging modus.

Another try could be to map the server drive instead of using \\servername.
Create New Account
help
VB Net SendMessage I'm converting an old VB app over the VB.Net. The app was using DDE code that is no longer supported in .Net. What Yes or No to a window within another application process? Public Const wnamePageMaker As String = "Adobe PageMaker 6.5" Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal
Execute PDF Files from VB6 C++ / VB If I want to "Execute PDF Files from VB6" application I am using SHELL command, but I have to declare "two paths and files": .EXE Acrobat File Path and File itself; and .PDF File Path and File itself, as shows: Var = SHELL("C: \ Program Files \ Adobe \ Reader 8.0 \ Reader \ AcroRd32.EXE" + " " + Is there a way to use a "Short Path file type and invokes the "interpreter" like Acrobat or other? Beforehand, thank you very much. VB Controls Discussions Excel (1) Adobe (1) AutoCAD (1) Database (1) ShellExecute (1) Acrobat (1) Windows (1) Interpreter (1) Take a Execute PDF Files from VB6 application I am using SHELL command, but I have to declare two paths and files: .EXE Acrobat File Path and File i
Trying to return a child handle using FindWindowEx C++ / VB Trying to return a child handle using FindWindowEx. FindWindowEx works fine when starting from the Included below Class = #32770 Caption = Print to File Handle = 8586216 Parent = 6751222 Class = AdobeAcrobat Caption = Adobe Reader - [01224603.PDF] Handle = 6751222 Parent = 0 Class = AcrobatOffscreenDocumentWnd Caption = 01224603.PDF Handle = 4915972 Parent Microsoft Visual Basic [run] Handle = 5243518 Parent = 0 Class = TextPad4 Caption = TextPad - [S: \ PROC \ Apps \ Vb \ Adobe \ Reader \ Dev \ FindChild.txt] Handle = 7471678 Parent = 0 Class = ThunderMain Caption = ProcReader Handle = 12517908 Parent = 0 Class = CabinetWClass Caption = S: \ PROC \ Apps \ Vb \ Adobe \ Reader \ Dev Handle = 6029454 Parent = 0 Class = Progman Caption = Program Manager Handle = 65692 Parent = 0 hParent as the first parament - Failure ? apiFindWindowEx(6751222, 0, "#32770", "Print to File") 0 * ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** Private Declare Function apiGetClassName Lib "user32" Alias ByVal lpClassName As String, ByVal nMaxCount As Long) As Long Private Declare Function apiGetDesktopWindow Lib "user32" Alias Private Declare Function apiGetWindow Lib "user32" Alias ByVal wCmd As
Sending a printer escape C++ / VB I have successfully gotten my VB 6 program to create a PDF file by programmatically changing the default printer to my The structure is defined on page 14 of that document. I believe this is the declare for the printer escape (not sure of this): Private Declare Function Escape Lib "Gdi" (ByVal Hdc%, ByVal nEscape%, ByVal ncount%, ByVal indata$, ByVal oudata as structure or to send it to the escape. Can someone give me a hand? Thanks VB WinAPI Discussions PDFWriterProperties.docinfo.creationDate (1) PDFWriterProperties.docinfo.modDate (1) PDFWriterProperties.docinfo.producer (1) PDFWriterProperties dont have the SDK and googleing it looks like it has to be purchased from adobe on a case by case basis (if they approve you). The SDK looks like it begins with the API declaration, then the structure declaration (although it is generally better to declare the structure before the function that uses it), and it ends with the function that will be called from the main program, SelecFichier (means SelecFile). In SelecFichier, you declare an object of type OPENFILENAME, its name is OFName. After that, the different members are
WinAPI macro recorder C++ / VB Hello, I was wondering if there is some WinAPI macro recorder out there? Preferably freeware on, and give me a quick method to get a VBA macro i need produced :) VB WinAPI Discussions Microsoft Excel (1) Office 2003 (1) Excel (1) Adobe (1) Application.ActivePrinter (1) VBA (1) XP (1) VB (1) ArmsteR <davidarmstrong@harronhomes.com> schrieb im Beitrag No, of course not. How should that a sample code. Often there is no difference between calling the Windows API function from VB and VBA, so a VB sample will do. - - - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - THORSTEN ALBERS Universität Freiburg albers@ uni-freiburg.de - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - As has already been Programmers-Guide / dp / 0672315904 As Appleman's book is a fairly standard programming text (before vb.net) you may also be able to find a copy in your local or college internal function only. I will need to send windows print commands to the autodesk and adobe applications and therefore need the API commands for this control. ArmsteR <davidarmstrong@harronhomes.com> schrieb