1
votes

I'm using

Selection.FormFields.Add Range:=Selection.Range, Type:= _
        wdFieldFormTextInput

to insert some formfields into a Word document. I've been asked to add some text to each formfield, for instance one need to be with the default text "placement".

Is this possible with Word VBA?

Thanks.

1

1 Answers

2
votes

You can add a Result:

Dim fld As FormField
Set fld = Selection.FormFields.Add(Range:=Selection.Range, Type:= _
        wdFieldFormTextInput)
fld.Result = "placement"

See http://msdn.microsoft.com/en-us/library/office/ff839761.aspx