I recently reinstalled Windows 10, Avira Free Antivirus v. 184.108.40.206, and Office Professional Plus 2010. Before the reinstallation, this combination of applications worked fine.
Now, when I try to open the VBA IDE from a new Word document, I get the following message:
Word has encountered a problem.
There is a problem saving the file.
with some possible causes listed underneath, such as missing disk space, low RAM, or missing permissions; none of which are relevant.
The only thing that might be relevant is:
This error can also occur if the computer is running a version of antivirus software that is incompatible with the Microsoft Office or must be updated.
As noted, I am running Avira Free Antivirus, and AFAICT the antivirus is updated. I tried opening the VBA IDE while Avira real-time protection was turned off, but without success.
Once I dismiss the message, the VBA IDE window opens, but there is no available project, and most of the menu items are disabled.
Saving a document with the
.docm extension before opening the VBA IDE doesn't help.
There are comparable odd results when trying to open the VBA IDE from other applications:
I've tried uninstalling and reinstalling VBA via the Office installer.
Security settings are set to disable macros with a warning. IIRC the old behavior was to disable macros unless I explicitly allowed them for the specific document. Trust the object model for each application is checked.
I've looked for a setting to control this in Avira, with no success.
The registry doesn't contain the
VBAOff key described here.
How can I enable VBA for the Office applications?
NB. The previous installation wasn't a clean install of Windows 10; it was first Windows 8, then 8.1, then 10.
Things I have tried before opening the VBA editor:
Normal.dotmtemplate and allowing Word to recreate it
HKLM\SYSTEM\CurrentControlSet\Control\FileSystem LongPathsEnabled = 1, and rebooting
Looking at the Event Viewer, I didn't find anything in System, Application or Security (all under Windows Logs). The only thing I did find was the following event in Applications and Services Logs -> Microsoft Office Alerts every time I try to open the VBA editor in Word on a new document:
Log Name: OAlerts Source: Microsoft Office 14 Alerts Date: 07/03/2019 20:49:42 Event ID: 300 Task Category: None Level: Information Keywords: Classic User: N/A Description: Microsoft Word Word has encountered a problem. P1: 200815 P2: 14.0.7015.1000 P3: 5v59 P4: 0x80070002 Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="Microsoft Office 14 Alerts" /> <EventID Qualifiers="0">300</EventID> <Level>4</Level> <Task>0</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2019-03-07T18:49:42.772417400Z" /> <EventRecordID>120</EventRecordID> <Channel>OAlerts</Channel> <Security /> </System> <EventData> <Data>Microsoft Word</Data> <Data>Word has encountered a problem.</Data> <Data>200815</Data> <Data>14.0.7015.1000</Data> <Data>5v59</Data> <Data>0x80070002</Data> </EventData> </Event>
There is no similar event when opening the editor in Excel or PowerPoint.
Using Sysinternals ProcMon, capturing only while trying to open the VBA editor from Word, and filtering the results for
Process Name = "WINWORD.EXE" and excluding
BUFFER OVERFLOW and
NAME NOT FOUND from
Result, I found the following:
RegOpenKey ACCESS DENIED HKLM\Software\WOW6432Node\Microsoft\VBA CreateFileMapping FILE LOCKED WITH READERS C:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA7\VBE7.DLL CreateFileMapping FILE LOCKED WITH READERS C:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA6\VBE6EXT.OLB
FILE LOCKED WITH READERS repeats a number of times.
But on further investigation, I see that later reads from the same registry key (
HKLM\Software\WOW6432Node\Microsoft\VBA) succeed. Also, the
CreateFileMapping is using the long name of the path; which is immediately followed by a successful
CreateFileMapping using the DOS name, e.g.
You might have to set Windows Update to automatically download and install recommended updates. Installing any important, recommended, and optional updates can frequently correct problems by replacing out-of-date files and fixing vulnerabilities. To install the latest Microsoft Office updates, see Update Office and your computer with Microsoft Update.
For list of the latest Office updates, see Office Updates. If your issue is not resolved after you install the latest Windows and Office updates, go to method 2.
It's a good idea to make sure that your computer has the latest updates installed for Windows. Updates often fix software problems. Before you use any of the following methods, try first to install updates. After you install the updates, restart your computer, and then start Word.
Follow the steps in this section carefully. Serious problems might occur if you modify the registry incorrectly. Before you modify it, back up the registry for restoration in case problems occur.
Here are troubleshooting methods you should try:
Method 1: Insert your document into another file
Method 2: Start Word by using the /a switch
Method 3: Delete the Word Data registry subkey
Method 4: Delete the Word Options registry key
Method 5: Replace the Normal.dot or Normal.dotm global template file
Method 6: Disable the Startup folder add-ins
Method 7: Delete the COM add-ins registry keys
Method 8: Change the default printer
Follow details in MSDN.
Since the error suggests that a file cannot be created/written to/read, I would start by using procmon by Sysinternals to reveal any read/write errors or access denied errors by the office application. It’s possible that a folder in the required path is missing, or that file permissions are not set as expected.
This may also reveal whether certain registry keys are missing or have incorrect permissions.
You should try running the application after turning off UAC temporarily if you haven’t already. UAC could be prevent other processes from spawning despite running the original app as Administrator.
Check the System, Application and Security event logs for errors and warnings around the time of your attempts. If they are present and repeat at each attempt to start VBA, add them to your question as further evidence.
Create a new user account with local Administrator rights. Log on with the new account and try starting the VBA editor. This provides a ‘clean’ environment based on the local default user profile, which helps determine if user profile corruption is the cause.
Since this strange problem arrives on more than one computer, even in fact on all your computers, this relates more to your installation than to a bug in Office.
The problem might be that your company is installing Windows Update patches selectively (MSUS), or an unfortunate choice of installation options, or some software product you have installed on all your computers (primary suspect is always the security software).
Some tests that you can make are booting in Safe Mode to disable all third-party
software, or to use
to check which process is locking
Last test is to make a clean installation of Windows 10 and only of Office, using default installation settings, then running repeatedly Windows Update until it finds no more updates. You can do this in a virtual machine to simplify.
Whatever you will find, I believe that this problem relates to your installation methodology or software.
Once a time, I encountered the same error while using both MS Office 2016 and MS Office 2003 on the same computer, I searched a lot and found one thing that was similar to not having enough permission to do so, even on the administrator account.
As you said, you are using Windows 10. Open task manager, and check Office Source Engine status, if it is stopped then run it, but if you can't run it and try Ccleaner and clean up the registry and restart the computer.
User contributions licensed under CC BY-SA 3.0