View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Opening An External File

You need to use the shell command and specify the complete path of where the
adobe reader is located on your PC. Note the is a space between the adobe
path and the file name

Adobe = "C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe"
Shell (Adobe & " c:\temp\bell.pdf")


Adobe may be located in a different location on your PC. You may need to
search the c drive to find where adobe is located if you plan to use the
macro on other PC's.

You can use filesearch for locating the adobe reader. I'm searching the
entire c: drive. You may want to use a path like "C:\Program Files instead
of c:.


msgbox("Searching for adobe - this may take a couple of minutes")
With Application.FileSearch
.NewSearch
.LookIn = "C:\"
.SearchSubFolders = True
.Filename = "AcroRd32.exe"
.MatchTextExactly = True
.FileType = msoFileTypeAllFiles
If .Execute() = 0 Then
MsgBox ("Cannot find adobe - exiting macro")
Exit Sub
Else
adobe = .FoundFiles.Item(1)

End If
End With




"Matthew" wrote:

I am trying to write what should be a fairly simple thing....

I need the user to be able to select a report thorugh drop down menus,
then an example of this is shown on the screen, I can do this using
one of J.E. McGimpsey's brilliant macros.

I would then like thbe user to be able to click a buttone and the
actual report (usualy pdf) to open, not to hard I thought........

I have a total of 80 reports all stored in the one file with sensible
names.

Can anyone help ?

Matthew