Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 151
Default Opening pdf's from Excel

Hi there.

I've got a "Menu" worksheet that has a listbox on it. The listbox contains a
list of the files in a networked folder elsewhere and is populated using
application.FileSearch.
These are all Word documents and the user can open them my double clicking
in the item in the listbox.

I use
Set wdApp = CreateObject("Word.Application") etc to open Word and then open
the file. This works well for all users who use a mix of XP and Windows 2000.

The problem is that the Word documents in the aforementioned folder are
likely to be converted to pdf's. I've tested the listbox by populating it
from a folder with pdf files and using Tom Ogilvy's code to open it.

Sub Tester2a()
Shell "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe" & _
" c:\toc1\amcr37-4.pdf", 1
End Sub


This works for the windows 2000 users with Adobe Reader 7, but not for XP
users with Adobe Reader 8.
Adobe Reader 8 opens but displays a message box "File Not Found".

Is there any way to allow for different versions and paths of Adobe Reader,
perhaps using CreateObject as with Word?

Many thanks in advance.
L

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Opening pdf's from Excel

I just ran this and it was fine:

Shell "C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe" & "
c:\LitchfieldTour.pdf", 1

Make sure the PDF file actually exists where specified.

--
Jim
"Libby" wrote in message
...
| Hi there.
|
| I've got a "Menu" worksheet that has a listbox on it. The listbox contains
a
| list of the files in a networked folder elsewhere and is populated using
| application.FileSearch.
| These are all Word documents and the user can open them my double clicking
| in the item in the listbox.
|
| I use
| Set wdApp = CreateObject("Word.Application") etc to open Word and then
open
| the file. This works well for all users who use a mix of XP and Windows
2000.
|
| The problem is that the Word documents in the aforementioned folder are
| likely to be converted to pdf's. I've tested the listbox by populating it
| from a folder with pdf files and using Tom Ogilvy's code to open it.
|
| Sub Tester2a()
| Shell "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe" & _
| " c:\toc1\amcr37-4.pdf", 1
| End Sub
|
|
| This works for the windows 2000 users with Adobe Reader 7, but not for XP
| users with Adobe Reader 8.
| Adobe Reader 8 opens but displays a message box "File Not Found".
|
| Is there any way to allow for different versions and paths of Adobe
Reader,
| perhaps using CreateObject as with Word?
|
| Many thanks in advance.
| L
|


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
Printing PDF's mcp201 Excel Discussion (Misc queries) 0 November 17th 08 06:04 PM
Creating PDF's through VBA mcp201 Excel Discussion (Misc queries) 0 November 17th 08 03:14 PM
Opening pdf's while embedded into an excel document as a package [email protected] Excel Programming 0 October 26th 06 02:19 PM
How do I hyperlink multiple pdf's into my excel spreadsheet Tim Excel Discussion (Misc queries) 0 October 19th 06 03:51 PM
Creating PDF's in Excel robin Excel Discussion (Misc queries) 7 May 10th 05 10:43 PM


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

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"