Hi,
I'm using a flat text file (comma delimited) as a merge source. How can I
set the delimiter to use for the mail merge without Word asking me when I
set the data source?
ie. at present I write this code (shown below), however, word sometimes asks
me what I wish to use as the delimiter. This is true when there is just one
column in the merge data source text file. Can I set this manually using
VBA?
Thanks
' Setup the merge type.
theDocument.MailMerge.MainDocumentType = WdMailMergeMainDocType.wdCatalog
' and open the data source.
theDocument.MailMerge.OpenDataSource( _
Name:=m_MergeFileName, _
ConfirmConversions:=False, _
ReadOnly:=False, _
LinkToSource:=False, _
AddToRecentFiles:=False, _
PasswordDocument:="", _
PasswordTemplate:="", _
WritePasswordDocument:="", _
WritePasswordTemplate:="", _
Revert:=False, _
Format:=Word.WdOpenFormat.wdOpenFormatAuto,
_
Connection:="", _
SQLStatement:="", _
SQLStatement1:="")
' Destination to new document.
theDocument.MailMerge.Destination =
Word.WdMailMergeDestination.wdSendToNewDocument
' Don't copy over blank items.
theDocument.MailMerge.SuppressBlankLines = True
Peter Jamieson - 29 Sep 2004 14:23 GMT
No, the only way you have a chance of doing it is to connect using ODBC and
specify the delimiter for the file you want to open in the SCHEMA.INI file
in th eappropriate directory.

Signature
Peter Jamieson
> Hi,
>
[quoted text clipped - 26 lines]
> WritePasswordTemplate:="", _
> Revert:=False, _
Format:=Word.WdOpenFormat.wdOpenFormatAuto,
> _
> Connection:="", _
[quoted text clipped - 9 lines]
>
> theDocument.MailMerge.SuppressBlankLines = True