Re: Opening a .pdf file with ShellExecute

Posted by WAllison on May 21, 2002

In Reply to: Opening a .pdf file with ShellExecute posted by BeckyR on May 20, 2002

: I am having problems opening a .pdf file with the ShellExecute command. The code is:

: ShellExecute(Handle,'open',PChar'c:\data\gradesheets.pdf'),nil,nil,SW_SHOW);

: but all that happens when this is executed is the Adobe Acrobat splash screen appears and then closes, and the file is never opened.

: Any ideas on what I may be missing?

Try it like this:

ShellExecute(Handle, PChar('Open'), PChar('c:\data\gradesheets.pdf'),nil , PChar('c:\data'), SW_SHOWNORMAL);

l8rz

Related Articles and Replies:


Delphi Forum :: Tutorials :: Source code :: Tips