How to fix Runtime Error 91 on Windows?

Issue: I would like to get some help with an error message: ”Runtime Error 91: Object variable or with block variable not set”. I see this message every time I am opening Word. It is newly installed on my computer, but everything went fine during the installation and I cannot understand why it is showing the error. Could you help to find the reason and fix this error, please?

Solved Answer

“Runtime Error 91: Object variable or with block variable not set” is a runtime error that can occur on all versions of Windows-based operating systems. It is a relatively common error, and the main culprit is usually the DCOMCnfg.exe file, which is often used to configure permissions and set system-wide security settings.

When this file is corrupted, or some other issues arise, the program cannot work properly, and Runtime Error 91 pops up on the screen. However, there might be other reasons for the issue to arise, and we will explore all the methods that could help you fix Runtime Error 91.

There are several different scenarios when the Runtime Error 91 can show up, such as during program installation, startup operation, or a shutdown, although some users may also see the error when they upgrade their Windows to a newer version. The time when the issue is first spotted also determines the measures that need to be taken to fix Error 91 on the machine.

Runtime Error 91 on WindowsFix Runtime Error 91 on Windows

When the Runtime Error 91 occurs after the installation of the program, the reason why it happens is related to the problems with a link to the downloaded software. Often Runtime Error 91 appears when this link is missing or interrupted. What is more, this error is often followed by the “Error 59999 – Application-defined or object-defined error.”

The latter error might occur when generating a report to XML/Enhanced XML and is is caused by insufficient permissions on the FRxXMLTag.XML file in the FRx directory. Thus, in order to get rid of this problem, you need to fix this file.

Note: if you want to repair various Windows errors and BSODs[1] automatically, do not hesitate to use FortectMac Washing Machine X9.

Method 1. Reinstall the problematic application

Issues with variables might be caused by file corruption. In order to fix that corrupted data within the system files, users could run a built-in SFC scan. However, this method will not work if the corrupted files are not those of Windows but the external application, even if it is one of the core programs that run on the PC. Thus, you should try to reinstall the problematic app that causes the Runtime Error 91.

  • Type in Control Panel into Windows search and hit Enter
  • Go to Programs > Uninstall a program
  • From the list, select the app, right-click and pick Uninstall Reinstall the problematic appReinstall the problematic app
  • Once done, re-install the app and see if that helps to fix Runtime Error 91

Method 2. Update Windows

Fix it now!
To repair damaged system, you have to purchase the licensed version of Fortect.

The Runtime Error 91 might be related to .NET Framework[2] and Visual Basic, updates for which are applied via Windows updates. Therefore, make sure you Windows is up to date:

  • Right-click on Start button and pick Settings
  • Select Update & Security
  • Lick Check for updates Update WindowsUpdate Windows via Settings
  • Wait till Windows downloads and installs all the required updates
  • Reboot your PC

Method 3. Scan your machine for malware

Malware[3] can cause all sorts of problems on your computer, and also corrupt multiple files that are related to either system or program files. Therefore, malware can be one of the factors why you are facing Runtime Error 91. To make sure that this is not the case, you should scan you computer with reputable anti-malware software.

There are plenty of paid and free third-party anti-malware solutions available online, so you can choose based on your needs. However, you can also use Windows Defender (now known as Microsoft Defender) to perform a full system scan in order to make sure no malicious files are present.

  • Click on system tray arrow and double-click the Windows Security icon
  • Select Virus and threat protection
  • Pick Scan options below Quick Scan button
  • Select Full scan option and click Scan now Scan the PC for malwareYou can use Windows Defender to perform a full system scan

Method 4. Set DCOMCnfg.exe to be allowed to run by “Everyone”

Fix it now!
To repair damaged system, you have to purchase the licensed version of Fortect.
  • Type in DCOMCnfg.exe into Windows search box and hit Enter
  • In the Component Services window, expand the following: Component Services > Computers > My Computer
  • Right-click on My Computer and select Properties
  • Select COM Security tab and under Access Permissions pick Edit Limits
  • Pick Everyone from the groups and make sure that Local and Remote Access are set to Allow Configure DCOMCnfg.exe fileConfigure DCOMCnfg.exe file

Method 5. Give full control to FRxXMLTag.XML file

In case the Runtime Error 91 is followed by the Error 5999, you should perform the following steps:

  • Run Windows as administrator
  • In Windows Explorer browse to FRx directory.
  • Right-click on the FRxXMLTag.XML file and select Properties.
  • When in Properties, click the Security Tab.
  • In Security Tab, add the group Everyone and select Full Control.
  • Click OK.

Repair your Errors automatically team is trying to do its best to help users find the best solutions for eliminating their errors. If you don't want to struggle with manual repair techniques, please use the automatic software. All recommended products have been tested and approved by our professionals. Tools that you can use to fix your error are listed bellow:

do it now!
Download Fix
Compatible with Microsoft Windows
Still having problems?
If you failed to fix your error using Fortect, reach our support team for help. Please, let us know all details that you think we should know about your problem.
Fortect - a patented specialized Windows repair program. It will diagnose your damaged PC. It will scan all System Files, DLLs and Registry Keys that have been damaged by security threats.
This patented repair process uses a database of 25 million components that can replace any damaged or missing file on user's computer.
To repair damaged system, you have to purchase the licensed version of Fortect malware removal tool.

Protect your online privacy with a VPN client

A VPN is crucial when it comes to user privacy. Online trackers such as cookies can not only be used by social media platforms and other websites but also your Internet Service Provider and the government. Even if you apply the most secure settings via your web browser, you can still be tracked via apps that are connected to the internet. Besides, privacy-focused browsers like Tor is are not an optimal choice due to diminished connection speeds. The best solution for your ultimate privacy is Private Internet Access – be anonymous and secure online.


Data recovery tools can prevent permanent file loss

Data recovery software is one of the options that could help you recover your files. Once you delete a file, it does not vanish into thin air – it remains on your system as long as no new data is written on top of it. Data Recovery Pro is recovery software that searchers for working copies of deleted files within your hard drive. By using the tool, you can prevent loss of valuable documents, school work, personal pictures, and other crucial files.

About the author
Gabriel E. Hall
Gabriel E. Hall - Passionate computer expert

Gabriel E. Hall is an expert troubleshooter who has been working in the information technology industry for years.

Contact Gabriel E. Hall
About the company Esolutions

Read in other languages

What you can add more about the problem: "How to fix Runtime Error 91 on Windows?"