Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Opening Acrobat Reader using VBA
Though I have added the Acrobat Library under tools and references I get an error 429 which says ActiveX component cant create object. Can you please test this and see if you get to the bottom of this problem? Sub Open_PDF() Dim PDDoc As AcroPDDoc Dim i As Long Set PDDoc = CreateObject("AcroExch.PDDoc") i = PDDoc.Open("d:\test.pdf") End Sub -- Raam ------------------------------------------------------------------------ Raam's Profile: http://www.excelforum.com/member.php...o&userid=28666 View this thread: http://www.excelforum.com/showthread...hreadid=484759 |
#2
|
|||
|
|||
Opening Acrobat Reader using VBA
Some questions to clear up the situation:
1) Which Version of Acrobat are you using? 2) Do you only have Reader or also other Adobe Products on your PC? 3) Which Object Library did you reference? This is not really an Excel problem, I would post it in Adobe Forums. Hier is a link to try: http://forum.planetpdf.com/ Didem "Raam" wrote: Though I have added the Acrobat Library under tools and references I get an error 429 which says ActiveX component cant create object. Can you please test this and see if you get to the bottom of this problem? Sub Open_PDF() Dim PDDoc As AcroPDDoc Dim i As Long Set PDDoc = CreateObject("AcroExch.PDDoc") i = PDDoc.Open("d:\test.pdf") End Sub -- Raam ------------------------------------------------------------------------ Raam's Profile: http://www.excelforum.com/member.php...o&userid=28666 View this thread: http://www.excelforum.com/showthread...hreadid=484759 |
#3
|
|||
|
|||
Opening Acrobat Reader using VBA
Hi again!
If you just want to open the document, try this: Sub Open_PDF() Dim RetVal As Double RetVal = Shell("C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe D:\test.pdf", vbNormalFocus) End Sub Change the path of Acrobat and of the file you want to open. If you don't know the path you can find it out in cmd-Window with two commands: C:\assoc .pdf ..pdf=AcroExch.Document C:\ftype AcroExch.Document AcroExch.Document="C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe" "%1" Hope this helps! Didem "Raam" wrote: Though I have added the Acrobat Library under tools and references I get an error 429 which says ActiveX component cant create object. Can you please test this and see if you get to the bottom of this problem? Sub Open_PDF() Dim PDDoc As AcroPDDoc Dim i As Long Set PDDoc = CreateObject("AcroExch.PDDoc") i = PDDoc.Open("d:\test.pdf") End Sub -- Raam ------------------------------------------------------------------------ Raam's Profile: http://www.excelforum.com/member.php...o&userid=28666 View this thread: http://www.excelforum.com/showthread...hreadid=484759 |
#4
|
|||
|
|||
Opening Acrobat Reader using VBA
Hi, was having similar issues. I have a dynamic location where a document is
saved and then I want to open the document. I tried what you had below. But when it tried to open it in Acrobat, I get an error in Acrobat "There was an error opening this document. The file does not exist". I tried: RetVal = Shell("C:\Program Files\Adobe\Acrobat 5.0\Acrobat\Acrobat.exe \\servername\AAAA-ABCDEFG20051114101850.pdf", vbNormalFocus) And sLocation = "\\servername\AAAA-ABCDEFG20051114101850.pdf" RetVal = Shell("C:\Program Files\Adobe\Acrobat 5.0\Acrobat\Acrobat.exe " & sLocation, vbNormalFocus) Neither one worked. I can open the file from Acrobat by the File/Open process. What I need to do is to open the file directly so users don't have to go find the document. Any suggestions? Thanks in advance. Phill "ODI" wrote: Hi again! If you just want to open the document, try this: Sub Open_PDF() Dim RetVal As Double RetVal = Shell("C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe D:\test.pdf", vbNormalFocus) End Sub Change the path of Acrobat and of the file you want to open. If you don't know the path you can find it out in cmd-Window with two commands: C:\assoc .pdf .pdf=AcroExch.Document C:\ftype AcroExch.Document AcroExch.Document="C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe" "%1" Hope this helps! Didem "Raam" wrote: Though I have added the Acrobat Library under tools and references I get an error 429 which says ActiveX component cant create object. Can you please test this and see if you get to the bottom of this problem? Sub Open_PDF() Dim PDDoc As AcroPDDoc Dim i As Long Set PDDoc = CreateObject("AcroExch.PDDoc") i = PDDoc.Open("d:\test.pdf") End Sub -- Raam ------------------------------------------------------------------------ Raam's Profile: http://www.excelforum.com/member.php...o&userid=28666 View this thread: http://www.excelforum.com/showthread...hreadid=484759 |
#5
|
|||
|
|||
Opening Acrobat Reader using VBA
Hi!
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. I first had the same error and I recognized that the path syntax was not right. If you use variables, watch their values by debugging modus. Another try could be to map the server drive instead of using \\servername. Good night... (It's 10.30 pm hier!) "smogerp" wrote: Hi, was having similar issues. I have a dynamic location where a document is saved and then I want to open the document. I tried what you had below. But when it tried to open it in Acrobat, I get an error in Acrobat "There was an error opening this document. The file does not exist". I tried: RetVal = Shell("C:\Program Files\Adobe\Acrobat 5.0\Acrobat\Acrobat.exe \\servername\AAAA-ABCDEFG20051114101850.pdf", vbNormalFocus) And sLocation = "\\servername\AAAA-ABCDEFG20051114101850.pdf" RetVal = Shell("C:\Program Files\Adobe\Acrobat 5.0\Acrobat\Acrobat.exe " & sLocation, vbNormalFocus) Neither one worked. I can open the file from Acrobat by the File/Open process. What I need to do is to open the file directly so users don't have to go find the document. Any suggestions? Thanks in advance. Phill "ODI" wrote: Hi again! If you just want to open the document, try this: Sub Open_PDF() Dim RetVal As Double RetVal = Shell("C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe D:\test.pdf", vbNormalFocus) End Sub Change the path of Acrobat and of the file you want to open. If you don't know the path you can find it out in cmd-Window with two commands: C:\assoc .pdf .pdf=AcroExch.Document C:\ftype AcroExch.Document AcroExch.Document="C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe" "%1" Hope this helps! Didem "Raam" wrote: Though I have added the Acrobat Library under tools and references I get an error 429 which says ActiveX component cant create object. Can you please test this and see if you get to the bottom of this problem? Sub Open_PDF() Dim PDDoc As AcroPDDoc Dim i As Long Set PDDoc = CreateObject("AcroExch.PDDoc") i = PDDoc.Open("d:\test.pdf") End Sub -- Raam ------------------------------------------------------------------------ Raam's Profile: http://www.excelforum.com/member.php...o&userid=28666 View this thread: http://www.excelforum.com/showthread...hreadid=484759 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help: Can't display contents of Adobe Acrobat Document in Sheet | Excel Discussion (Misc queries) | |||
Opening two separate instances of Excel | Excel Discussion (Misc queries) | |||
Hyperlink not opening | Excel Discussion (Misc queries) | |||
Excel error - Startup (and Acrobat PDFMaker) | Setting up and Configuration of Excel | |||
Slow opening files - possible cause and solutoin | Excel Discussion (Misc queries) |