iFocus.Life News News - Breaking News & Top Stories - Latest World, US & Local News,Get the latest news, exclusives, sport, celebrities, showbiz, politics, business and lifestyle from The iFocus.Life,

How to Remove Word Document Properties in VBA

104 54
    • 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.

Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time
You might also like on "Technology"

Leave A Reply

Your email address will not be published.