When is a macro not a macro? (MS Word)
Odd phenomenon started six to nine months ago.
Many of my "clients" (non-technical co-workers) create/edit documents for other clients.
Part of my job is to minimize things that make them hate technology :-)
One of those things is puzzling me. Some of the Word documents, when I open them, warn me that they contain开发者_JAVA百科 macros. But when I launch the VBA editor, there are no macros--not even any empty modules.
What's up with that?
This happens sometimes when a macro used to be present, but has been removed. The best way to clear this is to save the document as a .RTF or .docx and then save the file again as a .doc.
Hava you actually checked tools->macros?
Also it may be a warning that can be disabled from within word.
The company you work for, do they mind changing macro security level to med / low? That way you can avoid this message entirely.
I've seen that from time to time. Check there really are no objects by going to View>Project Explorer (Ctrl+R) in the VBE first.
I believe this warning appears not just for macros, but for other customisations such as key bindings and toolbars.
Folks, I did say I verified there are no macros. The latest doc does have some "form-like" things on it--apparently the author cut and pasted some text fields from a web form as illustrations. But the VB editor doesn't show them. However, when the document is open, the little tiny "design mode" widget is present. (I didn't see it at first because it floats and Word decided to put it off on the other monitor instead of in front of the doc window.)
I tried ->RTF->Doc, and it did get rid of the phantom macros. So THANKS, Irwin!
Setting the security settings to medium will not get rid of the warning. That's where I always run. That setting, by the way, is a per-user setting, not s document setting, so to get rid of it, I'd have to show all seven thousand users how to set to LOW, meaning execute all macros on any document without question. Since a good number of them ignore policy against downloading non-work-related stuff, I wouldn't do that if I could. (Some of our "XYZ doesn't work!" calls result from unauthorized installations of AIM, Yahoo toolbar, Google apps, etc., etc.)
I managed to remove the "invisible macros" from a document with these steps:
- Open the document in Word (I'm using Word 2003)
- Press Alt+F8 to bring up the 'Macros' dialog
- In the "Macros in:" dropdown list find and select the name of the current document you have open.
- Click the 'Create' button, immediately close the VB editor window that appears.
- Press Alt+F8 again to bring the Macros window back up.
- Click the 'Edit' button, on the resulting VB editor window, look in the Project Explorer pane. Find the document you currently have open in the tree, expand it with the + button.
- In the "Modules" folder find the macro you just created in step 4. (In my case it is named "NewMacros") Right click the macro and select "Remove ...", click 'No' on the dialog popup.
- In the VB editor click the save button. Close the editor.
- Back in Word click the save button. Close Word.
- Now when you reopen the document you should no longer recieve a warning about macros!
精彩评论