Re: Opening a .pdf file with ShellExecute


[ Related Articles and Replies ] [ DelphiLand FAQ ] [ Delphi Tutorials ]

Posted by WAllison on May 21, 2002 at 20:29:50:

In Reply to: Re: Opening a .pdf file with ShellExecute posted by BeckyR on May 21, 2002 at 15:56:48:

: : : 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?

: : : Thanks

: : Try it like this:

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

: : l8rz

: Thanks for the help.

: It's weird, when I run it in debug mode it sometimes works, sometimes doesn't, but when I run it staight from the .exe it always works...


without a look st the source - i just can't say - since you've been messing with debug (nothing wrong with that) - r u sure that all exceptions are being trapped properly???

Waz


Related Articles and Replies:


[ Related Articles and Replies ] [ DelphiLand FAQ ] [ Delphi Tutorials ]