Adding Formatting or Style to FormField


#1

I’m using DocumentBuilder.InsertTextInput to create input fields in a Word document. I wan to be able to control the width of the input field and its style - including a border. Does the API support styles or formatting for this object?

_builder.InsertTextInput("MyID", TextFormFieldType.RegularText,"","",0);

Thanks!

Jeff


#2

Hey Jeff,

The width of an input field is determined by the length of its default text that you can pass as the fourth parameter to InsertTextInput. As to the formatting of the field, it is determined by the Font property of the DocumentBuilder object. Just set its properties as required before you insert a field.