Populate the Word Company Property from a Drop-Down List
Question details
The user wants a Word drop-down selection to populate the built-in Company document property, preferably without VBA.

- 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.
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.
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.
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.
On Windows, press Alt+F11 to open the VBA editor. In the project for your document, open Microsoft Word Objects > ThisDocument.
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
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.

Enter the Company property manually without macros
Use this approach when macros are unavailable and the Company property must still contain the selected value.
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.

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.




