Readdy Write  
0,00 €
Your View Money
Views: Count
Self 20% 0
Your Content 60% 0

Users by Links 0
u1*(Content+Views) 10% 0
Follow-Follower 0
s2*(Income) 5% 0

Count
Followers 0
Login Register as User

Text input fields in Word with vba c #

02.11.2018 (👁57)


 

This code example shows how to insert FormTextInput form fields in word.

The insertion takes place in the example at runtime, programmatically.

 

 

A new form field is created via Word.Range.FormFields.Add (..) added

FormField field = act_Image_Range.FormFields.Add(act_Image_Range, WdFieldType.wdFieldFormTextInput);

 

Example code in C #

Insert via Word.Range.FormFields.Add (new ..)

//< add textinput field >

act_Image_Range.InsertAfter("\n\r");

FormField field = act_Image_Range.FormFields.Add(act_Image_Range, WdFieldType.wdFieldFormTextInput);

field.TextInput.EditType(WdTextFormFieldType.wdRegularText);

field.OwnStatus = true;

field.HelpText = "Bildtext";

field.TextInput.Default = "enter Image-Text";

//</ add textinput field >

 

 

subject:

Programming in vba, C #

Word ContentControl

 

Example application

Text input as FormFields type: wdFieldFormTextinput

 

Subject:

C #, Visual Studio Vsto interop com

FormField, form fields, form input, ContentControls