How to Insert Predefined Text Using Objects in Word Documents
Question details
The user wants to select specific objects or areas in a Word document (using a pen or finger) to automatically trigger the insertion of corresponding predefined text in another location.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Creating an interactive document where selecting or tapping an object populates relevant text fields remotely within the same document.
- Observed behavior
- Word lacks a simple, native feature to select arbitrary objects and insert text remotely, especially on mobile. Achieving this requires using advanced desktop features like VBA macros, IF fields, and content controls.
Ensure you are using the desktop version of Microsoft Word, as mobile or tablet versions do not support the VBA macros or advanced field controls necessary for remote text automation.
Use IF Fields with Bookmarks and AutoText
Set up conditional IF fields linked to document bookmarks to display specific predefined text based on conditions met in your selection.
This method utilizes Word's built-in field codes to evaluate text or selections at a bookmarked location and display an associated block of predefined text elsewhere.
Highlight the target text or area, go to the 'Insert' tab, click 'Bookmark', type a name without spaces, and click 'Add'.
Navigate to the location where you want the predefined text to appear and press 'Ctrl + F9' to insert a blank field bracket {}.
Inside the brackets, type the IF statement syntax. For example: IF BookmarkName = "Condition" "Predefined Text" "Alternative Text".
Right-click the field code and select 'Update Field', or simply select it and press 'F9' to execute the logic and display the predefined text.

Automate Text Insertion Using VBA Macros
Write a VBA macro that detects a click on a specific object and dynamically inserts Building Blocks or AutoText at a designated bookmark.
Use Building Blocks Gallery Content Control
Use Content Controls to let users select predefined text blocks from a custom drop-down gallery at a specific location.
Create and Edit Advanced Documents for Free with WPS Office
While complex VBA macros and nested IF fields require robust desktop software, WPS Office provides a lightweight, highly compatible alternative for everyday document editing. Enjoy a familiar interface and seamless compatibility with Microsoft Word formats without the hefty subscription fee.

Frequently Asked Questions
Can I use interactive objects to insert text on Word for iPad or Android?
No, mobile and tablet versions of Word do not support VBA macros or the advanced field controls required for this level of interactivity. To set up and use these automated text features, you must use the desktop version of Word.
Do IF fields update automatically when I click an object?
IF fields in Word do not update dynamically simply by clicking an object or changing a bookmark. You generally need to select the field and press F9 to refresh it, or use a VBA macro to force the document to update its fields.
What are Building Blocks in Word?
Building Blocks (also found under Quick Parts) are reusable pieces of content, such as predefined text, headers, or tables, that you can save to a gallery and insert into documents quickly without having to type them out again.




