Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to print PDF file from VFP directly?
Message
 
 
To
21/06/2004 11:44:25
Ken Penrod
Technical Perspectives, Inc.
Richardson, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00904836
Message ID:
00915674
Views:
74
Ken,

You've to declare all parameters for ShellExecute function. Your declaration is missing STRING lpDirectory, ;.


> I tried code similar to yours...
>
> DECLARE integer ShellExecute IN "Shell32.DLL" ;
> integer hwnd, ;
> string lpVerb, ;
> string lpFile, ;
> string lpParamenters, ;
> long nShowCmd
>
>= ShellExecute(0, "Open","acrord32.exe", "y:\tx2004b1\guide\start.pdf", "", 3)
>
>and also the following code from the link you had...
>
> DECLARE integer ShellExecute IN Shell32 ;
> integer hwnd, ;
> string lpVerb, ;
> string lpFile, ;
> string lpParamenters, ;
> integer nShowCmd
>
>= ShellExecute(0, "Open","y:\tx2004b1\guide\start.pdf","", "", 3)
>
>In both cases I got an error message "Too many arguments". I've got Acrobat 5.0 installed on my Win 2K computer.
>
>What am I doing wrong?
>
>Ken Penrod
>
>>Actually, I take that back. If there is a registry entry for acrord32.exe then it works without the path. I just tested the below succsfully:
>>
>>DECLARE INTEGER ShellExecute IN "Shell32.dll" ;
>>    INTEGER hwnd, ;
>>    STRING lpVerb, ;
>>    STRING lpFile, ;
>>    STRING lpParameters, ;
>>    STRING lpDirectory, ;
>>    LONG nShowCmd
>>
>>llok=ShellExecute(0, "open", "acrord32.exe", " /p /h c:\acordforms\finishedforms\61nc.pdf", "", 0)
>>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform