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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you remove macros from a Word file? 1

Status
Not open for further replies.

beniez

IS-IT--Management
Mar 23, 2001
72
GB
I've had this a couple of times: I have documents in which I wrote a macro for a specific purpose, then removed them when the purpose was over.

Now there's no trace of any code in the file, no modules or forms or anything; but with macro warnings set on, I still get warned that the file contains macros. How do I eradicate every trace of macro-ness and return my file to its pre-macro state?

Ben

SAWS
(Sunday At Work - Sad!!)
 
Hi,

Not sure if you know that the macros can live in the "normal" section of the VB editor. I think this is so they can be used "globally"

If you have checked here then I am of no help at all.

Regards,

Peter Remember- It's nice to be important,
but it's important to be nice :)
 
I've had a similar problem with Word 97 a few years back. My remedy was this:

Enable macros
create new macro (accept macro1 as default)
(set for this document only)
typed in "HI THERE" then return key
Stop macro
used VB editor to confirm code was written.
Exited & saved document.

Reopened doc
enabled macros
Tools > macros > macros (opens macro selection window)
selected Macro1 > Delete
opened VB editor > located macro1 code
selected all Macro1 code and deleted it
exit & saved

Reopened doc (no macros notification now)

Try it and see if this works for you as well.
 
Miggy

Thanks. The problem is that when I go into Tools, Macro, there's no macro there! Nor can I find any more code to delete (I've deleted it all).

Ho hum.

Ben
 
Have you tried what I've suggested above? I think if you create a fake macro and then delete it as specifically mentioned above, it should reset the internal pointers to "no-macros" in this doc file.

If that doesn't work, then it's most likely that you had changed the default "name" to something else. If you DO RECALL that "name" then use the above suggestion but use that recalled "macro name" in place of:

create new macro (accept macro1 as default)
(set for this document only)

and then continue with the deletion process as mentioned.


Note: don't forget to save it so that the internal pointers have something to find, and to delete.
 
Have you made sure that the module 'New macros' or any other blank module has been deleted? Open up the editor and look through the list?

Grant
 
Miggy

You're right, I hadn't read your first post in sufficient detail - apologies.

It didn't work - I'm sure you're right about why - I almost never let it use 'Macro1' as the name, and I'm damned if can remember now what it was called. But at least I know how to deal with the problem in future, so *star* and thanks.

Ben
 
Darn. The only other thing I can suggest is to:

Copy the file AND rename the COPIED File to include the Extension " .TXT "

using notepad, open the TXT file.

you should be able to scroll through the TXT file and READ each line carefully to see if there are any macro names that pop-out at you. If there are any, write them down.

Then try the process I've mentioned above--just don't forget to use the macro names you find in place of the 'default macro name'.

Write back with whatever results you get. In the meantime if someone else should know of a better way, please inform us.

--MiggyD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top