M
Mike Trout
I've got an application that uses OLE auto. to open a word doc, make it a
mailmerge doc, attach a previously created data file (in sdf format - comma
separated, quote delimited) merge and print. This works well as long as the
data file and/or the document have already been merger. Otherwise I get the
dialog box asking me what the separators are. I'd need to avoid this.
The word doc is, for example, "letter1.doc", the data source is
"mergedata.sdf", and the (trimmed of the error checking, etc...) code I use
is (word is assumed to be already open here):
oword.documents.open( "letter1.doc", false, true)
oword.activedocument.mailmerge.maindocumenttype = 0
omerge = oword.activedocument.mailmerge
omerge.opendatasource( "mergedata.sdf", "wdopenformattext", false, true,
true, false, "", "", false, "", "", "DSN=All files", "" )
omerge.execute( false )
I get the separater dialog box in the omerge.opendatasource line I believe.
What changes can I make to have it automatically select commas & quotes?
TIA
mailmerge doc, attach a previously created data file (in sdf format - comma
separated, quote delimited) merge and print. This works well as long as the
data file and/or the document have already been merger. Otherwise I get the
dialog box asking me what the separators are. I'd need to avoid this.
The word doc is, for example, "letter1.doc", the data source is
"mergedata.sdf", and the (trimmed of the error checking, etc...) code I use
is (word is assumed to be already open here):
oword.documents.open( "letter1.doc", false, true)
oword.activedocument.mailmerge.maindocumenttype = 0
omerge = oword.activedocument.mailmerge
omerge.opendatasource( "mergedata.sdf", "wdopenformattext", false, true,
true, false, "", "", false, "", "", "DSN=All files", "" )
omerge.execute( false )
I get the separater dialog box in the omerge.opendatasource line I believe.
What changes can I make to have it automatically select commas & quotes?
TIA