Word & Mail Merge

Hi Folks,
I am going to realize an automate process to create a mail merge document with Word 2008.
I have divided my process in few steps:

  1. open a document ‘MyDoc.doc’
  2. Attaches a data merge header source to the document ‘MyDoc.doc’.
    The header source file is a word document and the field names are tab
    separated,
  3. Attaches a data source to the document ‘MyDoc.doc’.
    4)Performs the data merge operation

After step 2 the Header Record Delimiters dialog box appears
To fully automate the merge process I need to specify the delimiters
before hand and/or ensure the dialog box does not appear.

Here is my early snippet ( not working!!! )sample code:


tell application “Microsoft Word”
open “Documents:Test:Model.doc”
activate “Model.doc”
set main document type of data merge of active document to format
document type form letters confirm conversions false

open header source data merge of active document name “Macintosh
HD:Development:Vars:HeaderFile.doc” without add to recent files
and Revert open format text False
open data source data merge of active document name “Macintosh
HD:Development:Vars:DataFile.doc”
set myMerge to data merge of active document
set destination of myMerge to send to new document
execute data merge myMerge
save as active document file name “xxx”
close document “Documents:Test:Model.doc”
end tell