I am trying to insert a mail-merge field and I can't find the correct syntax.
This is what I've got so far and it doesn't work.
(The code works up to the "End with", it's the next line that is the problem.)Code:With wrdDoc .Content.InsertAfter Format(MyDate, "dddd, d MMMM yyyy") .Content.InsertParagraphAfter .Content.InsertAfter "Dear " End With ActiveDocument.Fields.Add Range:=Selection.Range, Type:=wdFieldMergeField _ , Text:=" MERGEFIELD First"
I would be very grateful if someone knows the correct syntax. I've tried some other versions of this, also unsuccessfully.




Reply With Quote