> And I also note it fires when the Word document window is > activated. Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback. When I move between content controls I get the OnExit, OnEnter, OnExit you. ObjCC.SetPlaceholderText, , "Select your favorite animal "ĬontentControls Collection Support and feedback This is because to exit a content control you have to click the mouse into an area that has regular text, if you click off to the side of the page it will not. Set objCC = (wdContentControlDropdownList) SelectContentControlsByTitle('control').Item(1).Range.Text '. In the Word docs VBA, I can access them via. In Excel, I create the word objects and open the file, but I cant figure out how to actually access the controls. The following example creates a new drop-down list content control and adds several items to the list. Im attempting to populate a Word.dotm document that has content control text boxes using Excel. In this case, you can either move the insertion point or use the Range parameter to specify a location within the document. Step 2: Add content controls The content control field will appear in the document. If the insertion point or current selection is inside a content control of a different type, this method raises an error. The Developer tab will appear on the Ribbon. You can nest content controls only within rich-text content controls, building block gallery content controls, and group content controls. If omitted, Word places the content control at the position of the insertion point or replaces the current selection. Specifies where in the active document to place the content control. However, whenever the date is entered in one of the mapped controls, it appears in. The thing is, that gives you another date picker control rather than just the date (as with the REF field). Expand and double-click the 'ThisDocument' class module of the document project. Mapped Content Controls and Document Properties. If not displayed, display the Project Explorer pane (Ctrl+r). I would require Greg Maxey's utility to do that. If omitted, Microsoft Word inserts a rich-text content control. You could try mapping it and using the mapped control. Specifies the type of content control to insert into the active document. SyntaxĮxpression An expression that returns a ContentControls object. Adds a new content control, of the type specified, into the active document and returns a ContentControl object that represents the new content control.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |