Solved

How to delete all custom document properties from Word document?

Posted on 2010-09-10
2
677 Views
Last Modified: 2012-05-10
Hi I have dozens of word documents on dozens of laptops, each with about 150 custom document properties on them.

The custom document properties are causing errors with a Word plugin we are using and need to be deleted.

The problem is that when you open the custom document properties tab in Word 2007 (Microsoft Button > Prepare > Properties > Advanced Properties > Custom) there is no way to select multiple properties when deleting (ctrl+click and shift+click won't work).... so I would have to click each property and select delete for each document on each laptop.

I don't know much about VB scripting but is there a way to automate this process at least at the document level?
0
Comment
Question by:ob1_
2 Comments
 
LVL 8

Accepted Solution

by:
PandaPants earned 500 total points
ID: 33647151
Pretty simple, actually:
Public Sub DeleteAllCDPs()
    Dim xx As DocumentProperty
    For Each xx In ActiveDocument.CustomDocumentProperties
        xx.Delete
    Next xx
End Sub

Open in new window

0
 
LVL 6

Author Closing Comment

by:ob1_
ID: 33647320
Cool thanks!
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will show you how to use shortcut menus in the Access run-time environment.
No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question