Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Opening a .pdf file with Adobe Reader 8.0

Excel XP & Win XP
I have used the following code (credit to Tom Ogilvy) to open a .pdf file.
It has worked just fine, now it doesn't. I now get an error that the file
cannot be found. The only difference that I am aware of is that I recently
upgraded to Adobe Reader 8.0 from Adobe Reader 7.0.
Question: Does anyone have an insight as to what may be happening? Thanks
for your time. Otto
Sub OpenPdfFile(WhichOne As String)
Dim Filename As String
Dim myShell As Object
Set myShell = CreateObject("WScript.Shell")
Filename = "C:\LettersForms\Ops Manual\" & WhichOne & " Ops
Manual.pdf"
myShell.Run ("AcroRd32.exe " & Filename)
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Opening a .pdf file with Adobe Reader 8.0

I should have added that Acrobat Reader (8.0) does open with this code, but
that's all. Otto
"Otto Moehrbach" wrote in message
...
Excel XP & Win XP
I have used the following code (credit to Tom Ogilvy) to open a .pdf file.
It has worked just fine, now it doesn't. I now get an error that the file
cannot be found. The only difference that I am aware of is that I
recently upgraded to Adobe Reader 8.0 from Adobe Reader 7.0.
Question: Does anyone have an insight as to what may be happening?
Thanks for your time. Otto
Sub OpenPdfFile(WhichOne As String)
Dim Filename As String
Dim myShell As Object
Set myShell = CreateObject("WScript.Shell")
Filename = "C:\LettersForms\Ops Manual\" & WhichOne & " Ops
Manual.pdf"
myShell.Run ("AcroRd32.exe " & Filename)
End Sub




  #3   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 145
Default Opening a .pdf file with Adobe Reader 8.0


myShell.Run ("AcroRd32.exe """ & Filename & """")

paths with spaces need quotes

Tim


"Otto Moehrbach" wrote in message
...
I should have added that Acrobat Reader (8.0) does open with this code, but
that's all. Otto
"Otto Moehrbach" wrote in message
...
Excel XP & Win XP
I have used the following code (credit to Tom Ogilvy) to open a .pdf
file. It has worked just fine, now it doesn't. I now get an error that
the file cannot be found. The only difference that I am aware of is that
I recently upgraded to Adobe Reader 8.0 from Adobe Reader 7.0.
Question: Does anyone have an insight as to what may be happening?
Thanks for your time. Otto
Sub OpenPdfFile(WhichOne As String)
Dim Filename As String
Dim myShell As Object
Set myShell = CreateObject("WScript.Shell")
Filename = "C:\LettersForms\Ops Manual\" & WhichOne & " Ops
Manual.pdf"
myShell.Run ("AcroRd32.exe " & Filename)
End Sub






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Opening a .pdf file with Adobe Reader 8.0

Tim
Thanks for your response. The code I included in my original post works
as is with Acrobat Reader 7.0. I and my OP both had 7.0 and it worked fine
with both of us. We both now have 8.0 and that code no longer works (cannot
find the file error) for either one of us. The OP reinstalled 7.0 and the
code works fine again for him. I am looking for help in modifying the code
as needed to work with 8.0. Thanks again. Otto
"Tim" <tim j williams at gmail dot com wrote in message
...

myShell.Run ("AcroRd32.exe """ & Filename & """")

paths with spaces need quotes

Tim


"Otto Moehrbach" wrote in message
...
I should have added that Acrobat Reader (8.0) does open with this code,
but that's all. Otto
"Otto Moehrbach" wrote in message
...
Excel XP & Win XP
I have used the following code (credit to Tom Ogilvy) to open a .pdf
file. It has worked just fine, now it doesn't. I now get an error that
the file cannot be found. The only difference that I am aware of is
that I recently upgraded to Adobe Reader 8.0 from Adobe Reader 7.0.
Question: Does anyone have an insight as to what may be happening?
Thanks for your time. Otto
Sub OpenPdfFile(WhichOne As String)
Dim Filename As String
Dim myShell As Object
Set myShell = CreateObject("WScript.Shell")
Filename = "C:\LettersForms\Ops Manual\" & WhichOne & " Ops
Manual.pdf"
myShell.Run ("AcroRd32.exe " & Filename)
End Sub








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
How do I get rid of Adobe Reader icon? ajnmxx Excel Discussion (Misc queries) 1 January 15th 10 02:33 PM
how can you hyper link adobe reader files into excel dana c Excel Discussion (Misc queries) 1 August 4th 07 05:32 PM
Opening a pdf file with Adobe Reader Otto Moehrbach Excel Programming 9 March 14th 07 04:54 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
Identifying version of Adobe Reader Andrew Excel Programming 5 September 14th 05 06:25 AM


All times are GMT +1. The time now is 09:59 PM.

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"