K
kheisler6
I'm new to VBA in word, but I assume this should be easy. I'm using VBA
to set up a mailmerge and insert certain fields. How do I edit the code
to apply formatting to some of the fields? For example, in the lines
below, I would like the JournalDate field to be in italics.
Thank you.
###
With MainDoc.Fields
.Add Word.Selection.Range, Word.WdFieldType.wdFieldMergeField,
"AuthorList", False
'Selection.TypeText " "
.Add Word.Selection.Range, Word.WdFieldType.wdFieldMergeField,
"JournalDate", False
'Selection.TypeText " "
etc.
###
to set up a mailmerge and insert certain fields. How do I edit the code
to apply formatting to some of the fields? For example, in the lines
below, I would like the JournalDate field to be in italics.
Thank you.
###
With MainDoc.Fields
.Add Word.Selection.Range, Word.WdFieldType.wdFieldMergeField,
"AuthorList", False
'Selection.TypeText " "
.Add Word.Selection.Range, Word.WdFieldType.wdFieldMergeField,
"JournalDate", False
'Selection.TypeText " "
etc.
###