![]() |
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. |
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. |
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. |
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. |
All times are GMT +1. The time now is 09:50 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com