Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automating Mail Merge - Header Record Delimiters

Status
Not open for further replies.

KeyserSoze

Programmer
May 18, 2000
79
US
I have a mail merge working that takes a data source that is a text file and merges it with a document. Everything works fine except that when the data source is linked in, a "Header Record Delimiters" dialog box pops up wanting the user to confirm the field and record delimiters to be used with the data source.

Is there a way to change parameters to default the record delimeter to a CR/LF and the field delimiters to a tab? Here is the code:

Code:
    Documents.Open FileName:="C:\Documents and Settings\Sname\My Documents\Development\Applicants\Acknowledge_Applications_Paper.doc", _
        ConfirmConversions:=False, ReadOnly:=True, AddToRecentFiles:=False, _
        PasswordDocument:="", PasswordTemplate:="", Revert:=False, _
        WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _
        wdOpenFormatAuto, XMLTransform:=""
    ActiveDocument.MailMerge.OpenDataSource Name:=txtDataSource.Value _
        , ConfirmConversions:=False, ReadOnly:=True, LinkToSource:=True, _
        AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", _
        WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False, _
        Format:=wdOpenFormatText, Connection:="", SQLStatement:="", SQLStatement1 _
        :="", SubType:=wdMergeSubTypeOther
    With ActiveDocument.MailMerge
        .Destination = wdSendToNewDocument
        .SuppressBlankLines = True
        .Execute Pause:=False
    End With

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top