Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Raam
 
Posts: n/a
Default 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   Report Post  
ODI
 
Posts: n/a
Default 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   Report Post  
ODI
 
Posts: n/a
Default 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   Report Post  
smogerp
 
Posts: n/a
Default 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   Report Post  
ODI
 
Posts: n/a
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help: Can't display contents of Adobe Acrobat Document in Sheet Dab Excel Discussion (Misc queries) 1 October 4th 05 02:20 AM
Opening two separate instances of Excel Ron Bishop Excel Discussion (Misc queries) 2 August 4th 05 05:30 PM
Hyperlink not opening nikhilkaran Excel Discussion (Misc queries) 0 June 14th 05 01:16 PM
Excel error - Startup (and Acrobat PDFMaker) gxdata Setting up and Configuration of Excel 0 February 4th 05 03:44 AM
Slow opening files - possible cause and solutoin Bob Flanagan Excel Discussion (Misc queries) 0 November 29th 04 10:04 PM


All times are GMT +1. The time now is 11:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"