2

I open a .doc file in Word 2007 (sorry I am unable to supply the .doc) which pops up with a message above the document "Security warning: Macros have been disabled" but there are no macros shown in the macros listing and no functionality displayed in the VBScript editor.

Why does Word think this document contains macros and how can I remove them to prevent the warning?

Thanks,

Tom

5 Answers 5

2

I think Word is simply reporting that the properties of the document are configured to disable macros.

This is not the same as saying there are any macros.

If there were macros, they would be disabled.

And it's only a warning message. If you can configure the document not to disable macros, the warning should disappear.

1

If the file used to have macros and they were removed, it can still get incorrectly flagged by the security features as it can see the module exists even with no code in it.

Steps to reproduce problem: Open Word document. Open VB IDE (ALT-F11) Find the document project in the navigation pane. Right click > insert module. This creates a branch for "Modules" containing "Module1". Don't add anything to Module1. (This is basically the same as if someone recorded a macro then went and deleted it but did not actually remove the module).

So, for your troublesome document, open it, then ENABLE the content (if you don't you won't see it in the IDE). Alt-F11, go find the (empty) module and right click > remove. Don't bother to export before doing this (since it's empty, right?) Save and close the document.

If you are unsure about the provenance of the document and don't feel happy enabling the content, this should work (your mileage may vary): Open doc. Don't enable content Alt-F11 Find the document and right click > insert a module. Now remove that module and the IDE deletes the modules container with it, along with the disabled modules. Save and close

0

Install share components can solve this problem.

0
0

I solved this problem at last and the solution is not obvious. First go to installed programmes from control panel. Find add or remove features, Microsoft office Word. Enable Visual basic for applications. Then from word Options Macros, choose the level you want. In my case do not run macros without warning prompt. Andre IILTD.COM

2
  • Windows 10 pro 64 bit and office 2006 word
    – Andre
    Aug 16, 2017 at 21:56
  • Office 2007 pro. Only word was affected.
    – Andre
    Aug 18, 2017 at 6:47
0

I feel that I have to update this answer, as I was also looking to remove VBA from my document. With my own, my old primary template had modules to format documents as I needed them, and this affected new documents created with it.

So, the correct way to remove VBA from your Office document is by using the Organiser. To do this, ensure that the Developer ribbon is visible, and click the Marcos button...

Click the Macros button on the Developer ribbon

Now click the Organiser button...

Click the Organiser button

Select the module(s) that you want to remove from the current document to the left, or from the Normal.dot on the right, and click Delete...

Remove modules from the document or template

Though the images show the ribbon for Word 2016, not that much has cosmetically changed between 2007 and 2016.

You must log in to answer this question.