View Single Post
  #4   Report Post  
Peter Jamieson
 
Posts: n/a
Default

How do I then say, "and make that form field two characters wide"?

Something like:

Dim oFormField as FormField
Set oFormField =
ActiveDocument.FormFields.Add(Range:=Application.S election.Range, _
Type:=wdFieldFormTextInput)
With oFormField.TextInput
.Width = 2
End With

(You may find some of the relevant properties in the oFormField, and some in
oFormField.TextInput).

Drat! I had hoped for a more elegant solution, but it seems that this
problem has no elegant solution, only work-araounds.


Yes, there seem to have been many lost design opportunities in this area.

Peter Jamieson

"Darryl Kerkeslager" wrote in message
...
"Peter Jamieson" wrote
I can only suggest that you add a little bit more info to each ff tag to
store the formatting information you want and use it after the merge to
restore the formatting and so on.

e.g. if you want underline, set the field up as ff_underline, parse the
info. in your macro and apply the necessary properties.


Drat! I had hoped for a more elegant solution, but it seems that this
problem has no elegant solution, only work-araounds.


In this case, you might be slightly better off inserting the fields you
want by hand, then using another bit of VBA to examine their properties
and generate a "field name" that encodes the information you want to
transfer.


How do I put the information back in? For instance, I use this to add the
form field:

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

How do I then say, "and make that form field two characters wide"?


--
Darryl Kerkeslager

Power corrupts.
Absolute power corrupts absolutely.
Knowledge is power.
See www.adcritic.com/interactive/view.php?id=5927