I recorded a macro in Word, and this is what I got:
(The document that this produces looks like:Code:Sub Macro1() ' ActiveDocument.MailMerge.MainDocumentType = wdFormLetters Selection.TypeText Text:="Dear " WordBasic.MailMergeUseOutlookContacts ActiveDocument.Fields.Add Range:=Selection.Range, Type:=wdFieldMergeField _ , Text:="""First""" Selection.TypeParagraph Selection.TypeText Text:="Test only." End Sub
Dear «First»
Test only.
BTW, this code was recorded in Word 2007, I know that "WordBasic" is anachronistic but that's what I got.
I've also been going back to Word, to see what the Word help has to say, and the code looks quite different again.




Reply With Quote