Document Editing Problems

Populate the Word Company Property from a Drop-Down List

John WilsonJohn Wilson Nov 25, 2026 869 views

Question details

The user wants a Word drop-down selection to populate the built-in Company document property, preferably without VBA.

Populate the Word Company Property from a Drop-Down List
Product
Microsoft Word
Device & OS
not provided
Scenario
A form contains a drop-down content control, and its selected value should appear in the document's Company property.
Observed behavior
Selecting an item in the drop-down does not automatically update the Company property under File > Info.
Before you start

Check that your form uses a drop-down content control and that the Company field is available under File > Info > Properties > Show All Properties. If you want automatic updates, confirm that users can run trusted macros in desktop Word.

Solution 1Recommended

Update the Company property with a Word VBA event

Use this method when the built-in Company property must update automatically and users are permitted to run macros.

A standard drop-down content control does not directly write its selection to the built-in Company property. The following document event updates the property when the user exits the control.

This method requires a macro-enabled document and desktop Word with macros allowed. Users who cannot run macros will need to enter the property manually.

1
Tag the drop-down

In Word, select the drop-down, open Developer > Properties, and set its Tag to CompanySelector. If Developer is hidden, enable it under File > Options > Customize Ribbon.

2
Open the document code

On Windows, press Alt+F11 to open the VBA editor. In the project for your document, open Microsoft Word Objects > ThisDocument.

3
Add the exit event

Paste this code into ThisDocument: Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) If ContentControl.Tag = "CompanySelector" And Not ContentControl.ShowingPlaceholderText Then Me.BuiltInDocumentProperties("Company").Value = ContentControl.Range.Text End If End Sub

4
Save and test

Use File > Save As to save the document as a Word Macro-Enabled Document (.docm). With macros enabled under your organization's policy, choose a drop-down item, click outside the control, and check File > Info > Properties > Show All Properties > Company.

Update the Company property with a Word VBA event
Macro permissions matter: The event runs when the user leaves the control, not merely when an item is selected. Do not ask users to bypass their organization's macro security settings.
Free Microsoft Office alternative

Edit Word documents with WPS Writer

WPS Office is a free, lightweight alternative with a familiar interface for working with Word documents. Open existing files in WPS Writer for an easy transition; the Word-specific VBA event described above is not a WPS fix.

Edit and share documents in Microsoft Word DOCX formatUse a familiar interface for everyday document editingWork with form documents without switching to a heavy office suiteMove existing Word files into WPS Writer with minimal setup
microsoft office alternative - wps office

Frequently Asked Questions

Can a Word drop-down update the built-in Company property without a macro?

A standard drop-down content control does not automatically update the built-in Company property. Without automation, enter the selected value under File > Info > Properties > Show All Properties > Company.

Can I use a mapped content control instead of updating Company?

A content control can be mapped to custom XML or another supported document property to display a shared value in the document. That does not automatically update the built-in Company property; use it only if a displayed or separately stored value meets your needs.

Why did the VBA code not update the property immediately?

The example uses the ContentControlOnExit event, so click outside the drop-down after making a selection. Also check that the control's Tag is CompanySelector and that macros are allowed.

What file format should I use for the VBA solution?

Choose File > Save As and select Word Macro-Enabled Document (.docm). The event also requires desktop Word and permission to run the document's macros.