Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing a word document
Message
From
08/07/2006 11:47:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
08/07/2006 09:12:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01134666
Message ID:
01134690
Views:
18
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform