Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Open PDF File Using Reader 8

I was opening PDF Documentation Using the following Excel commands...
Dim strAdobeAppPath As String
Dim strAdobeFullName As String
Dim strAppFileToOpen As String
Dim AdobeValue As Long

strAdobeAppPath = "C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe"
strAdobeFullName = "C:\CRISNET\EXPORT\CMA_ToolKit_Default
Files\Real_Estate_Agent_Tool_Kit_Documentation.pdf "
strAppFileToOpen = strAdobeAppPath & " " & strAdobeFullName
AdobeValue = Shell(strAppFileToOpen, vbNormalFocus)

This stopped working with a "File not found" in Adobe Reader Version 8. Any
Suggestions would be greatly appreciated. The file can be opened successfully
using explorer.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Open PDF File Using Reader 8


The most obvious thing is that the file path refers to 6.0 but your post says
you are using version 8.
(for what it is worth, FoxIt Reader opens PDF files much, much faster)
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"Marvin"
wrote in message
I was opening PDF Documentation Using the following Excel commands...
Dim strAdobeAppPath As String
Dim strAdobeFullName As String
Dim strAppFileToOpen As String
Dim AdobeValue As Long

strAdobeAppPath = "C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe"
strAdobeFullName = "C:\CRISNET\EXPORT\CMA_ToolKit_Default
Files\Real_Estate_Agent_Tool_Kit_Documentation.pdf "
strAppFileToOpen = strAdobeAppPath & " " & strAdobeFullName
AdobeValue = Shell(strAppFileToOpen, vbNormalFocus)

This stopped working with a "File not found" in Adobe Reader Version 8. Any
Suggestions would be greatly appreciated. The file can be opened successfully
using explorer.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Open PDF File Using Reader 8

Soory for the confusion. It was working in version 6 thus the example code.
It no longer works in Version 8 using all of the correct paths and exe file
names. I will also try Foxit but I am going to distribute this software and
most people use the adobe software

"Jim Cone" wrote:


The most obvious thing is that the file path refers to 6.0 but your post says
you are using version 8.
(for what it is worth, FoxIt Reader opens PDF files much, much faster)
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"Marvin"
wrote in message
I was opening PDF Documentation Using the following Excel commands...
Dim strAdobeAppPath As String
Dim strAdobeFullName As String
Dim strAppFileToOpen As String
Dim AdobeValue As Long

strAdobeAppPath = "C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe"
strAdobeFullName = "C:\CRISNET\EXPORT\CMA_ToolKit_Default
Files\Real_Estate_Agent_Tool_Kit_Documentation.pdf "
strAppFileToOpen = strAdobeAppPath & " " & strAdobeFullName
AdobeValue = Shell(strAppFileToOpen, vbNormalFocus)

This stopped working with a "File not found" in Adobe Reader Version 8. Any
Suggestions would be greatly appreciated. The file can be opened successfully
using explorer.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Open PDF File Using Reader 8

Another way...
'If you use the shellexecute API the API determines the program to use.
'Declaration goes at top of module.

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

'Use it like this...
Sub OpenInDefaultApp(FullName As String)
ShellExecute 0, vbNullString, FullName, 0&, 0&, 1
End Sub

'Call it like this...
Sub TestMe()
OpenInDefaultApp "C:\Program Files\Adobe\Acrobat 8.0\Acrobat\Acrobat.exe"
End Sub
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Marvin"
wrote in message
Soory for the confusion. It was working in version 6 thus the example code.
It no longer works in Version 8 using all of the correct paths and exe file
names. I will also try Foxit but I am going to distribute this software and
most people use the adobe software




"Jim Cone" wrote:
The most obvious thing is that the file path refers to 6.0 but your post says
you are using version 8.
(for what it is worth, FoxIt Reader opens PDF files much, much faster)
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"Marvin"
wrote in message
I was opening PDF Documentation Using the following Excel commands...
Dim strAdobeAppPath As String
Dim strAdobeFullName As String
Dim strAppFileToOpen As String
Dim AdobeValue As Long

strAdobeAppPath = "C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe"
strAdobeFullName = "C:\CRISNET\EXPORT\CMA_ToolKit_Default
Files\Real_Estate_Agent_Tool_Kit_Documentation.pdf "
strAppFileToOpen = strAdobeAppPath & " " & strAdobeFullName
AdobeValue = Shell(strAppFileToOpen, vbNormalFocus)

This stopped working with a "File not found" in Adobe Reader Version 8. Any
Suggestions would be greatly appreciated. The file can be opened successfully
using explorer.


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
Opening a .pdf file with Adobe Reader 8.0 Otto Moehrbach Excel Programming 3 June 27th 07 03:44 AM
Opening a pdf file with Adobe Reader Otto Moehrbach Excel Programming 9 March 14th 07 04:54 PM
In Excel - Use Windows Explorer instead of File Open to open file KymY Excel Discussion (Misc queries) 1 August 5th 06 09:59 PM
how i can take file from adobe reader and make it read with micr. ahmed nasr Excel Discussion (Misc queries) 0 May 25th 06 05:44 AM
Print Acrobat Reader PDF file from VBA Matthias Claes Excel Programming 1 October 28th 05 10:02 AM


All times are GMT +1. The time now is 10:27 PM.

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

About Us

"It's about Microsoft Excel"