ActiveDocument.Fields.Add - Setting Font Color and Hidden?

M

ML

Is there a way to set the font when adding a new field?

Set newfield = ActiveDocument.Fields.Add(Range:=Selection.Range, _
Type:=FieldType, Text:=FieldText, _
PreserveFormatting:=PreserveFormat)
Add_Field = newfield.Index

Want to set the font to be hidden for this field?
 
C

Chuck Henrich

Quick and dirty: You can select the field and work on the selection.
Setting a range to equal the field (so you can work on a range object not a
selection object) involves more work.

Set newfield = ActiveDocument.Fields.Add(Range:=Selection.Range, _
Type:=FieldType, Text:=FieldText, _
PreserveFormatting:=PreserveFormat)

newfield.Select

Selection.Font.Hidden = True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top