Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word - PrintOut method
Message
From
21/03/2001 10:59:47
 
 
To
21/03/2001 10:25:10
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00487216
Message ID:
00487239
Views:
9
Hi!

Following is a sample of the full call of the PrintOut function:


loDoc.PrintOut(.F.,.F.,wdPrintAllDocument,"",ALLT(STR(1)), ;
ALLT(STR(2)), wdPrintDocumentContent, ALLT(STR(1)),"", ;
wdPrintAllPages,.F.,.T.)

The description of cnstants you can find in several places, ate least at fox.wikis.com you can find a full VFP header files for Word, Access and pther office appliactions.

Note that page ranges and number of copies should be a string. This probably the main reason why VFP crashes when passing them as default (and the main mistake when using this function, I was mistaken by this too).



>I cam observe this when automating Word '97 and Word 2000.
>
>
>loWord = CreateObject('Word.Application')
>loWord.Documents.Open('c:\temp\MyDoc.doc')
>loDoc = loWord.Documents('c:\temp\MyDoc.doc')
>
>
>I want to print the document.
>
>The following command fails:
>
loWord.Documents('c:\temp\MyDoc.doc').PrintOut(.f., .f., 0, '',,,,1)
>but this one works
>
loDoc = loWord.Documents('c:\temp\MyDoc.doc')
>loDoc.PrintOut(.f., .f., 0, '',,,,1)
>Replacing the document fullname with Letter number also fails.
>
>Can someone explain why?
>
>Daniel
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform