How to Remove Word Document Properties in VBA
- 1). Open the document and show the Developer tab in Word. Click on the "File" tab and "Options." Click on the "Customize Ribbon" category in the categories pane. In the right side under "Main Tabs" select "Developer." Click "OK" to save your changes and close the "Options" dialog box.
- 2). Click on the "Developer" tab and the "Visual Basic" button in the "Code" group. The Visual Basic Editor opens in a separate window.
- 3). Click on "Insert" and "Module" to start a new module.
- 4). Add a new procedure that will change the Document Properties for the Word document that is currently open.
"Public Sub ChangeProperty()
ActiveDocument.BuiltInDocumentProperties(wdPropertyTitle).Value = 'Meeting Notes';
ActiveDocument.BuiltInDocumentProperties(wdPropertyAuthor).Value = 'Jane Doe';
ActiveDocument.BuiltInDocumentProperties(wdPropertyCompany).Value = 'XYZ Company';
End Sub" - 5). Add in the line for the property that you want to change. Click the "Save" icon at the top of the Visual Basic Editor to save the module. The above code only changes the Title, Author and Company properties.