Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Code to remove Metadata from a Word Document

Status
Not open for further replies.

bernie321

Programmer
Jan 7, 2004
477
GB
Hi

We want to remove metadata from Word documents that relate to previous versions/changes made to the documents in word 2003.

It is mainly to stop recipients of emailed word docs from reading any ammendments that our company has made to the documents.

Any help would be much appreciated.

Thanks
B
 
Hi B,

Word has a RemovePersonalInformation property. When set to True, this removes all user information from comments, revisions and the Properties dialog box when the document is saved:

Sub Sanitise()
ThisDocument.RemovePersonalInformation = True
End sub

If there have been tracked changes, or edits stored via fast save, you'd want to clear them too.

Cheers
 
Hi Macropod

Thanks for your post.

Does this code remove the tracked changes or fast save edits?

Thanks
B
 
hi B,

No, it wouldn't do that - you'd have to code that separately. Plus, as I've just realised, the method isn't available with Word 2000 and earlier.

You might also like to check out:
where you'll find a free utility for removing metadata.

Other similar products are:
. ezClean from KKL Software (. iScrub from Esquire Innovations (. MetaDataAssistant from Payne Consulting (. MetaScrubber from BEC (. Workshare Metawall from Workshare Technology (
MS also has a similar tool that works on Office XP, and KB article 237361 ( describes how to minimize metadata in Microsoft Word 2000 documents, as well as providing some code to help.

For many of us, though, the easiest treatment is to export the document to a pdf file. That both produces a product without the metadata and limits (or prevents) unauthorised editing.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top