Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print
Message
 
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Re: Print
Miscellaneous
Thread ID:
00523681
Message ID:
00523711
Views:
8
This message has been marked as the solution to the initial question of the thread.
>When I create an instance of Word2000 I make it visible prompt to false but however when I use the PrintOut() function without any parameter Work becomes visible which is not what I want. Prior to call the PrintOut() I have of course open a document and printing text. Any ideas what I'm doing wrong.

Try:
#DEFINE wdPrintAllDocument 0
#DEFINE wdPrintSelection 1
#DEFINE wdPrintCurrentPage 2
#DEFINE wdPrintFromTo 3
#DEFINE wdPrintRangeOfPages 4

llPrintBackGround = .f.            && parm 1
lnPrintRangeType  = wdPrintFromTo  && parm 3
lcOutPutFileName  = ""             && parm 4
lcFrom            = "1"            && parm 5
lcTo              = "1"            && parm 6
lnCopies          = "1"            && parm 8
lcPageRange       = ""             && parm 9  if parm 3 is wdPrintRangeOfPages
llPrintToFile     = .f.            && parm 11 only if lcOutPutFileName is used
oWord.oDocument.PrintOut(llPrintBackGround, , lnPrintRangeType, , lcFrom, lcTo, , lnCopies)
To print the entire doc, change wdPrintFromTo to wdPrintAllDocument, and remove the 1 from the lcFrom and lcTo variables.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform