General information
Category:
COM/DCOM and OLE Automation
Tamar,
I am trying to get Word97 to print using VFP and using the following code:
nCopies = 1
cPages = ""
nRange = wdPrintAllDocument
nItem = wdPrintDocumentContent
nPageType = wdPrintAllPages
lCollate = .T.
lBackground = .T.
lPrintToFile = .T.
lAppend = .F.
oWord.ActivePrinter = "Mercury"
cDocName = oWord.ActiveDocument.Name
cPRNFileName = cPDFInPath + LEFT(cDocName,AT(".",cDocName) - 1) + ".PRN"
oWord.Application.PrintOut(cDocName,;
wdPrintAllDocument,;
wdPrintDocumentContent,;
nCopies,;
cPages,;
nPageType,;
lCollate,;
lBackground,;
lPrintToFile,;
cPRNFileName,;
lAppend)
*!* Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
*!* wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages,
*!* Collate:=True, Background:=True, PrintToFile:=True,OuputFileName:="", _
*!* Append:=False
*******************************
It keeps giving me a TYPE MISMATCH ERROR. What am I doing wrong?
Dave :-)
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only