Document Editing Problems

Insert Plain-Text Content Controls in Microsoft Word Macros

John WilsonJohn Wilson Nov 14, 2026 868 views

Question details

Add editable plain-text controls to sentences inserted by Word macros or reusable boilerplate.

Insert Plain-Text Content Controls in Word Macros
Product
Microsoft Word
Device & OS
not provided
Scenario
The user creates custom macros to insert recurring text and needs editable fields within that text.
Observed behavior
Reusable sentences contain plain-text content controls that can be edited after insertion.
Before you start

Open the document in the desktop version of Word and decide where the editable field should appear. To create a macro, make sure the Developer tab is available and macros are permitted by your organization's settings.

Solution 1Recommended

Insert a plain-text content control with VBA

Use this approach when an existing macro needs to add an editable field at the current selection.

1
Open the VBA editor

In Word, select Developer > Visual Basic, then open the module containing your macro or choose Insert > Module.

2
Add the control

In your macro, add this statement at the point where the control should appear: ActiveDocument.ContentControls.Add wdContentControlText, Selection.Range

3
Run the macro

Return to the document, place the cursor at the desired insertion point, and select Developer > Macros. Choose your macro and select Run.

4
Test the field

Click the inserted content control and type plain text. If the control belongs inside a longer sentence, have your macro insert the surrounding text and position the selection before adding the control.

Insert a plain-text content control with VBA
Keep the macro: If the macro is stored in the document, save it as a Word Macro-Enabled Document (.docm) using File > Save As.
Free Microsoft Office alternative

Create reusable documents with WPS Writer

WPS Office is a free, lightweight alternative with a familiar interface and Microsoft Word format compatibility for easier migration. Use WPS Writer for everyday document editing; it does not fix Word VBA macros.

Edit reusable boilerplate text in WPS WriterOpen and save Microsoft Word DOCX documentsWork in a familiar, easy-to-use interfaceUse a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

What VBA statement inserts a plain-text content control?

Use ActiveDocument.ContentControls.Add wdContentControlText, Selection.Range in a Word VBA macro. It adds the control at the current selection.

Can AutoText save a sentence with content controls?

Yes. Select the sentence and its controls, then choose Insert > Quick Parts > AutoText > Save Selection to AutoText Gallery. Insert it later from the AutoText gallery.

How can I insert an AutoText entry without opening the gallery?

In supported desktop versions of Word, type the entry's name at the insertion point and press F3.

How do I keep a macro in my Word document?

Choose File > Save As and save the document as a Word Macro-Enabled Document (.docm). Macro availability may also depend on your security settings.