View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ivyleaf Ivyleaf is offline
external usenet poster
 
Posts: 141
Default shell - open document

On Apr 4, 6:38*pm, Jarle wrote:
I want to open a document. Document format may vary.

I try with:

Dim f_name as String
Dim Returnvalue as Variant
f_name ="E:\forlder1\folder2\test.pdf"

ReturnValue = Shell("start " & Chr$(34) & f_name Chr$(34) )

According to a tip on a different web-site this should open the file in the
program it is connected to (he Acrobat Reader).

I always get error message "file not found", but the file is there.
What is wrong?

rgds
Jarle


Hi Jarle,

In your path, you have "Forlder1" which I reckon should maybe be
"Folder1"? This may be all that is wrong with your code.

Cheers,
Ivan.