I've been playing with the same code and have the pdf come up some of the
time and some of the not. ShellExecutes always returns 42 whether it
works or not. Has anyone else seen this or have an explanation?
I tried it with .doc files and had Word come up almost every time. The
return code is always 33.
Also tried .txt files - always failed always returned 42.
I am curious about the first parameter. What does "hwnd" represent?
TIA - Joe yoder
On Tuesday, July 08, 2008 2:13 PM, gureumi wrote:
>
>Date: Tue, 8 Jul 2008 14:13:45 -0400
>From: gureumi
>To: [EMAIL PROTECTED]
>cc:
>Subject: Re: pdf in vfp
>
>It works fine with me.
>
>----
>fname = SPACE(2)
>fname = GETFILE("pdf")
>IF EMPTY(fname)
> RETURN
>ENDIF
>*!* mcheck = alltrim(checks.pathname) + ALLTRIM(checks.filename) + ".pdf"
>
>declare long ShellExecute in "shell32.dll" ;
> long hwnd, ;
> string lpszOp, ;
> string lpszFile, ;
> string lpszParams, ;
> string lpszDir, ;
> long nShowCmd
>ShellExecute(0,'Open',(fname),'','',0)
>----
>
>
>On Tue, Jul 8, 2008 at 2:08 PM, Paul McNett <[EMAIL PROTECTED]> wrote:
>
>> Jim Harvey wrote:
>> > This doesn't work using a pdf (no error returned, just doesn't do
>> anything),
>> > but does with a jpg file, is it possible with a pdf?
>> >
>> > ***commandbutton.click
>> >
>> > mcheck = alltrim(checks.pathname) + ALLTRIM(checks.filename) + ".pdf"
>> >
>> > declare long ShellExecute in "shell32.dll" ;
>> > long hwnd, ;
>> > string lpszOp, ;
>> > string lpszFile, ;
>> > string lpszParams, ;
>> > string lpszDir, ;
>> > long nShowCmd
>> > ShellExecute(0,'Open',(mcheck),'','',0)
>>
>> Do you have a PDF reader, such as Adobe Acrobat Reader, installed on the
>> system (apologies if that sounds like a stupid question)?
>>
>> Paul
>>
>>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.