Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing a word document
Message
From
08/07/2006 13:43:03
 
 
To
08/07/2006 11:47:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01134666
Message ID:
01134696
Views:
15
>>needing to print a word document without opening word application or showing it in a form or previewing: just sending to the printer. Is it possible?
>>Thanx in advance
>
>Yes and no.
>Yes:
>
>declare long ShellExecute in "shell32.dll" ;
>	long hwnd, string lpszOp, ;
>	string lpszFile, string lpszParams, ;
>    string lpszDir, long nShowCmd
>lcDocument = "c:\myPath\blah blah.doc"
>ShellExecute(0,'Print',m.lcDocument,0,0,1)
>
>No:
>OS shows up word anyway.
>
>Alternatively if you didn't mean "not using automation" by saying "without opening word application" then you could do it w/o a word showing.
>
>oWord = create('word.application')
>...
>.PrintOut
>* quit when it finsihes.
>
>Cetin

Hi Cetin,
I have problem with printout: it returns such an error (1484 if i remember). Can you explain deeper your code, ie with 'myapp.doc'?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform