![]() ![]() Use the TextInput property with the FormField object to return a TextInput object. WdDoc. Use FormFields (Index), where Index is either the bookmark name associated with the text form field or the index number, to return a FormField object. You can hover your mouse over the fields to see the different options. Word.FormField ffld = (rng, ) įfld.Result = "Testing Text1 input" //optional, if you want to enter textį = "Testing Text1 default text to display" //Won't show if text is assigned to. Now youre ready to add the different parts of the form, which Word calls content control fields.To add a content control field, place your cursor in the desired location, then choose a field from the Controls group on the Developer tab. Word.Document wdDoc = (ref oMissing, ref oMissing, ref oMissing, ref oMissing) What you desire can be better achieved using the *.docx file format in Word 2007 and later. If you insert Section breaks into such a document, single sections can be protected/unprotected,īut some types of editing will still be impossible (headers and footers will be locked, for example). Note that in order for form fields to work correctly, the entire document must be protected as a form - editing outside of form fields is impossible.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |