Delete Macros

  • Thread starter Thread starter JR
  • Start date Start date
J

JR

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
 
Hi JR
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/micr...1ffa?lnk=st&q=delete+macros+group:*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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top