Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing a word doc from VFP
Message
 
To
20/04/2015 07:38:52
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01618752
Message ID:
01618766
Views:
37
>>>I think the solution is to decrease the margin in the printer properties margin setting.
>>>
>>>>Using the following code my word doc prints in VFP
>>>>
>>>>DECLARE INTEGER ShellExecute ;
>>>>IN SHELL32.DLL ;
>>>>INTEGER nWinHandle,;
>>>>STRING cOperation,;
>>>>STRING cFileName,;
>>>>STRING cParameters,;
>>>>STRING cDirectory,;
>>>>INTEGER nShowWindow
>>>>? ShellExecute(0,"print","c:\what.doc","","",0)
>>>>
>>>>But I get a message
>>>>
>>>>The margins of section 1 are outside the printable area of the page - do you want to continue?

>>>>
>>>>If I say yes it prints fine - how can I stop this message coming up?
>>
>>Tried that it doesn't seem to make any difference
>>
>>I realy need a command I can insert into shell execute
>
>Maybe you can use Windows Scripting Host instead of ShellExecute, since WSH has a function called SendKeys() which you can use to send keystrokes to the activated application. See here for sample code: https://support.microsoft.com/en-us/kb/259103?wa=wsignin1.0

I can't see how to use it but thanks anyway

I really need a command I can insert into shell execute to disable error printing
Specialist in Advertising, Marketing, especially Direct Marketing

I run courses in Business Management and Marketing
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform