General information
Category:
COM/DCOM and OLE Automation
Hi Nick,
I have but just one problem with the code you sent me. When I run it I get
a OLE ErrorCode of 0x80020005: Type Mismatch. Not sure what is going on...
Also do you know a place to look up OLE Error codes. Thanks Eric
>In general you just write the parameters in VFP style,, so False corresponds to .f., instead of Wod constants you can substitute their values from VBA Help or, better use the Word constants header file which you can download from Files Section.
>
>So this sample coul be translated to:
>
>#INCLUDE w97const.h
>oWord.ActiveDocument.MailMerge.OpenDataSource ("F:\APPS\MERGEDATA.DBF",.f.,.f.,.t.,.f.,"","","","",.f.,wdOpenFormatAuto, ;
>"DSN=FoxPro Files - Word;UID=;PWD=;SourceDB=F:\APPS;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=MACHINE;Null=Yes;Deleted=Yes;","SELECT * FROM MERGEDATA","")
>
>oWord.Application.MailingLabel.DefaultPrintBarCode = .f.
>
>oWord.Application.MailingLabel.CreateNewDocument("","","ToolsCreateLabels1",wdPrinterManualFeed)
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