PC Review


Reply
Thread Tools Rate Thread

Delete Macros

 
 
JR
Guest
Posts: n/a
 
      30th Oct 2007
Is there a way to programatically remove all macros from a document?
I am trying to clean up a bunch of documents so am looping thru them
applying:

WordBasic.AcceptAllChangesInDoc
WordBasic.DeleteAllCommentsInDoc

right now, however need to also remove all macros from the document as
part of this process. Having trouble finding the code to accomplish
this.

Thanks.

JR

 
Reply With Quote
 
 
 
 
Robert M. Franz (RMF)
Guest
Posts: n/a
 
      5th Nov 2007
Hi JR

JR wrote:
> Is there a way to programatically remove all macros from a document?
> I am trying to clean up a bunch of documents so am looping thru them
> applying:
>
> WordBasic.AcceptAllChangesInDoc
> WordBasic.DeleteAllCommentsInDoc
>
> right now, however need to also remove all macros from the document as
> part of this process. Having trouble finding the code to accomplish
> this.


I can't provide code, but I found an old discussion here:

http://groups.google.com/group/micro...%3A*word.vba*#

Basically, there seem to be two natural approaches:

1. Use the organizer to get rid of macro project elements, or

2. Do a round-trip save through RTF.

For starters, you can record a macro doing either, and look at the
objects and properties used.

HTH
Robert
--
/"\ ASCII Ribbon Campaign | MS
\ / | MVP
X Against HTML | for
/ \ in e-mail & news | Word
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete All Macros Hardeep_kanwar Microsoft Excel Worksheet Functions 1 31st Oct 2008 11:21 AM
delete macros =?Utf-8?B?QWhtZXREWQ==?= Microsoft Excel Misc 2 18th Oct 2007 10:07 AM
How can I delete all macros? Pheasant PluckerŪ Microsoft Excel Misc 20 27th Jul 2006 12:49 PM
How to Delete Another WorkBook Macros using Macros.. Possible? =?Utf-8?B?ZGRpaWNj?= Microsoft Excel Programming 7 24th Jul 2005 01:54 PM
Delete macros =?Utf-8?B?ZXhjZWw3Nzc=?= Microsoft Excel Misc 1 1st Apr 2004 10:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:44 PM.