[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to delete all custom document properties from Word document?

Posted on 2010-09-10
2
Medium Priority
?
691 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_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
PandaPants earned 2000 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

656 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