Runtime error 5981 application defined or object defined error как исправить

I’ve created macro in excel 2013 where I point some data from excel to Word (via word template).
in excel 2013 everything works perfectly, but now I have to run this excel also in older company PC where is installed only M$ Office 2010/win7 – fresh installation.

Set objDoc = objWord.Documents.Add(Template:=ThisWorkbook.Sheets("Data").Range("O1").Value & ThisWorkbook.Sheets("Data").Range("G2").Value)

in this excel 2010 I get run-time error 5981 (application-defined or object-defined error).

in cell “O1” is file folder where are this excel + word templates saved
cell “G2” contain info which template should be used (according to dropdown selection).

update: I’ve checked this on other PC with office 2010 and it works. Probably some add-in/library is not working correctly, but idk how to check it.

asked Jul 21, 2015 at 10:31

tryzhas's user avatar

1

Error 5981 seems to have two descriptions attached to it (why?):

  1. Could not open macro storage
  2. Application-defined or object-defined error

Since I got the second description I can only comment on that one, although “Could not open macro storage” seems to suggest that there is something wrong with (the macro’s in) the Word file itself.

In my situation the cause of error 5981 was that the Word-template was not a trusted document.
When opening the Word-template manually, it was opened in protected view. When opening the template automatically via VBA this apparently results in an error 5981.

answered Sep 16, 2016 at 12:01

Mill's user avatar

MillMill

1106 bronze badges

The error is because when you open the word template the view is protected.
Solution: disable protected view in microsotf word
Go to options, trusted center, protected view disable

answered Jun 7, 2017 at 23:48

walter's user avatar

Внимание, откроется в новом окне.
PDFПечать

Проблема характерна для старших версий MS Office (2010 и выше).

При создании документов (протоколов или сводных отчетов) возможно возникновение ошибки “5981 – Не удается открыть банк макросов”, как показано на рисунке.

Дополнительно данная ошибка может сопровождаться еще одной ошибкой (Error “5460 – Ошибка файла”), которая также возникает при создании новых документов.

Причиной данных ошибок является блокировка шаблонов программы из-за особого режима безопасности MS Word (блокируются файлы, полученные  из Internet, из внешнего источника или из сетевой папки).

Проблема характеризуется последующими сообщениями над документом, который подвергся блокировке, как показано на рисунке.

Можно применить изменения к конкретному шаблону, используя кнопки “Разрешить редактирование” или “Включить содержимое”, но лучше это сделать для всех используемых шаблонов, как описано ниже.

Известны 2 случая, которые приводят к блокировкам со стороны MS Word.

1 Случай. Блокируются шаблоны из стандартной папки templates другого ПК и воспринимаются MS Word как файлы из внешнего источника.

В данной ситуации необходимо добавить папку с шаблонами в надежные расположения MS Word через меню “Файл – Параметры”, как показано на рисунке.

Путь к папке с шаблонами по умолчанию: C:ProgramDataattest55.1templates

Папка с шаблонами по умолчанию находится в папке с настройками пользователя. Где хранятся настройки пользователя дополнительно можно ознакомиться в следующем МАТЕРИАЛЕ.

2 Случай. Для шаблонов настроена отдельная папка templates.

В этом случае выполняются такие же действия, что и для случая 1, но в надежных расположениях уже необходимо прописать путь, который определен пользователем для хранения шаблонов.

How to fix the Runtime Code 5981 Microsoft Word Error 5981

This article features error number Code 5981, commonly known as Microsoft Word Error 5981 described as Error 5981: Microsoft Word has encountered a problem and needs to close. We are sorry for the inconvenience.

About Runtime Code 5981

Runtime Code 5981 happens when Microsoft Word fails or crashes whilst it’s running, hence its name. It doesn’t necessarily mean that the code was corrupt in some way, but just that it did not work during its run-time. This kind of error will appear as an annoying notification on your screen unless handled and corrected. Here are symptoms, causes and ways to troubleshoot the problem.

Definitions (Beta)

Here we list some definitions for the words contained in your error, in an attempt to help you understand your problem. This is a work in progress, so sometimes we might define the word incorrectly, so feel free to skip this section!

  • Microsoft word — For programming questions related to Microsoft’s «Word» editor
Symptoms of Code 5981 — Microsoft Word Error 5981

Runtime errors happen without warning. The error message can come up the screen anytime Microsoft Word is run. In fact, the error message or some other dialogue box can come up again and again if not addressed early on.

There may be instances of files deletion or new files appearing. Though this symptom is largely due to virus infection, it can be attributed as a symptom for runtime error, as virus infection is one of the causes for runtime error. User may also experience a sudden drop in internet connection speed, yet again, this is not always the case.

Fix Microsoft Word Error 5981 (Error Code 5981)
(For illustrative purposes only)

Causes of Microsoft Word Error 5981 — Code 5981

During software design, programmers code anticipating the occurrence of errors. However, there are no perfect designs, as errors can be expected even with the best program design. Glitches can happen during runtime if a certain error is not experienced and addressed during design and testing.

Runtime errors are generally caused by incompatible programs running at the same time. It may also occur because of memory problem, a bad graphics driver or virus infection. Whatever the case may be, the problem must be resolved immediately to avoid further problems. Here are ways to remedy the error.

Repair Methods

Runtime errors may be annoying and persistent, but it is not totally hopeless, repairs are available. Here are ways to do it.

If a repair method works for you, please click the upvote button to the left of the answer, this will let other users know which repair method is currently working the best.

Please note: Neither ErrorVault.com nor it’s writers claim responsibility for the results of the actions taken from employing any of the repair methods listed on this page — you complete these steps at your own risk.

Method 1 — Close Conflicting Programs

When you get a runtime error, keep in mind that it is happening due to programs that are conflicting with each other. The first thing you can do to resolve the problem is to stop these conflicting programs.

  • Open Task Manager by clicking Ctrl-Alt-Del at the same time. This will let you see the list of programs currently running.
  • Go to the Processes tab and stop the programs one by one by highlighting each program and clicking the End Process buttom.
  • You will need to observe if the error message will reoccur each time you stop a process.
  • Once you get to identify which program is causing the error, you may go ahead with the next troubleshooting step, reinstalling the application.

Method 2 — Update / Reinstall Conflicting Programs

Using Control Panel

  • For Windows 7, click the Start Button, then click Control panel, then Uninstall a program
  • For Windows 8, click the Start Button, then scroll down and click More Settings, then click Control panel > Uninstall a program.
  • For Windows 10, just type Control Panel on the search box and click the result, then click Uninstall a program
  • Once inside Programs and Features, click the problem program and click Update or Uninstall.
  • If you chose to update, then you will just need to follow the prompt to complete the process, however if you chose to Uninstall, you will follow the prompt to uninstall and then re-download or use the application’s installation disk to reinstall the program.

Using Other Methods

  • For Windows 7, you may find the list of all installed programs when you click Start and scroll your mouse over the list that appear on the tab. You may see on that list utility for uninstalling the program. You may go ahead and uninstall using utilities available in this tab.
  • For Windows 10, you may click Start, then Settings, then choose Apps.
  • Scroll down to see the list of Apps and features installed in your computer.
  • Click the Program which is causing the runtime error, then you may choose to uninstall or click Advanced options to reset the application.

Method 3 — Update your Virus protection program or download and install the latest Windows Update

Virus infection causing runtime error on your computer must immediately be prevented, quarantined or deleted. Make sure you update your virus program and run a thorough scan of the computer or, run Windows update so you can get the latest virus definition and fix.

Method 4 — Re-install Runtime Libraries

You might be getting the error because of an update, like the MS Visual C++ package which might not be installed properly or completely. What you can do then is to uninstall the current package and install a fresh copy.

  • Uninstall the package by going to Programs and Features, find and highlight the Microsoft Visual C++ Redistributable Package.
  • Click Uninstall on top of the list, and when it is done, reboot your computer.
  • Download the latest redistributable package from Microsoft then install it.

Method 5 — Run Disk Cleanup

You might also be experiencing runtime error because of a very low free space on your computer.

  • You should consider backing up your files and freeing up space on your hard drive
  • You can also clear your cache and reboot your computer
  • You can also run Disk Cleanup, open your explorer window and right click your main directory (this is usually C: )
  • Click Properties and then click Disk Cleanup

Method 6 — Reinstall Your Graphics Driver

If the error is related to a bad graphics driver, then you may do the following:

  • Open your Device Manager, locate the graphics driver
  • Right click the video card driver then click uninstall, then restart your computer

Method 7 — IE related Runtime Error

If the error you are getting is related to the Internet Explorer, you may do the following:

  1. Reset your browser.
    • For Windows 7, you may click Start, go to Control Panel, then click Internet Options on the left side. Then you can click Advanced tab then click the Reset button.
    • For Windows 8 and 10, you may click search and type Internet Options, then go to Advanced tab and click Reset.
  2. Disable script debugging and error notifications.
    • On the same Internet Options window, you may go to Advanced tab and look for Disable script debugging
    • Put a check mark on the radio button
    • At the same time, uncheck the «Display a Notification about every Script Error» item and then click Apply and OK, then reboot your computer.

If these quick fixes do not work, you can always backup files and run repair reinstall on your computer. However, you can do that later when the solutions listed here did not do the job.

Other languages:

Wie beheben Fehler 5981 (Microsoft Word-Fehler 5981) — Fehler 5981: Microsoft Word hat ein Problem festgestellt und muss geschlossen werden. Wir entschuldigen uns für die Unannehmlichkeiten.
Come fissare Errore 5981 (Errore 5981 di Microsoft Word) — Errore 5981: Microsoft Word ha riscontrato un problema e deve essere chiuso. Ci scusiamo per l’inconveniente.
Hoe maak je Fout 5981 (Microsoft Word-fout 5981) — Fout 5981: Microsoft Word heeft een probleem ondervonden en moet worden afgesloten. Excuses voor het ongemak.
Comment réparer Erreur 5981 (Erreur Microsoft Word 5981) — Erreur 5981 : Microsoft Word a rencontré un problème et doit se fermer. Nous sommes désolés du dérangement.
어떻게 고치는 지 오류 5981 (마이크로소프트 워드 오류 5981) — 오류 5981: Microsoft Word에 문제가 발생해 닫아야 합니다. 불편을 끼쳐드려 죄송합니다.
Como corrigir o Erro 5981 (Erro 5981 do Microsoft Word) — Erro 5981: O Microsoft Word encontrou um problema e precisa fechar. Lamentamos o inconveniente.
Hur man åtgärdar Fel 5981 (Microsoft Word-fel 5981) — Fel 5981: Microsoft Word har stött på ett problem och måste avslutas. Vi är ledsna för besväret.
Как исправить Ошибка 5981 (Ошибка Microsoft Word 5981) — Ошибка 5981: Возникла ошибка в приложении Microsoft Word. Приложение будет закрыто. Приносим свои извинения за неудобства.
Jak naprawić Błąd 5981 (Błąd Microsoft Word 5981) — Błąd 5981: Microsoft Word napotkał problem i musi zostać zamknięty. Przepraszamy za niedogodności.
Cómo arreglar Error 5981 (Error 5981 de Microsoft Word) — Error 5981: Microsoft Word ha detectado un problema y debe cerrarse. Lamentamos las molestias.

The Author About The Author: Phil Hart has been a Microsoft Community Contributor since 2010. With a current point score over 100,000, they’ve contributed more than 3000 answers in the Microsoft Support forums and have created almost 200 new help articles in the Technet Wiki.

Follow Us: Facebook Youtube Twitter

Last Updated:

11/04/22 07:16 : A iPhone user voted that repair method 2 worked for them.

Recommended Repair Tool:

This repair tool can fix common computer problems such as blue screens, crashes and freezes, missing DLL files, as well as repair malware/virus damage and more by replacing damaged and missing system files.

STEP 1:

Click Here to Download and install the Windows repair tool.

STEP 2:

Click on Start Scan and let it analyze your device.

STEP 3:

Click on Repair All to fix all of the issues it detected.

DOWNLOAD NOW

Compatibility

Requirements

1 Ghz CPU, 512 MB RAM, 40 GB HDD
This download offers unlimited scans of your Windows PC for free. Full system repairs start at $19.95.

Article ID: ACX08353EN

Applies To: Windows 10, Windows 8.1, Windows 7, Windows Vista, Windows XP, Windows 2000

Speed Up Tip #27

Troubleshooting Slow Right-Click Context Menu:

Slow appearing right-click context menu is a common yet very annoying problem in Windows. Troubleshoot the issue by checking on your third-party extensions, graphics driver and registry keys. Also, check the installed programs on your computer as they would sometimes interfere with the right-click process.

Click Here for another way to speed up your Windows PC

Icon Ex Номер ошибки: Ошибка 5981
Название ошибки: Microsoft Word Error 5981
Описание ошибки: Ошибка 5981: Возникла ошибка в приложении Microsoft Word. Приложение будет закрыто. Приносим извинения за неудобства.
Разработчик: Microsoft Corporation
Программное обеспечение: Microsoft Word
Относится к: Windows XP, Vista, 7, 8, 10, 11

Оценка «Microsoft Word Error 5981»

«Microsoft Word Error 5981» обычно называется формой «ошибки времени выполнения». Чтобы убедиться, что функциональность и операции работают в пригодном для использования состоянии, разработчики программного обеспечения, такие как Microsoft Corporation, выполняют отладку перед выпусками программного обеспечения. К сожалению, некоторые критические проблемы, такие как ошибка 5981, часто могут быть упущены из виду.

Ошибка 5981 также отображается как «Microsoft Word Error 5981». Это распространенная ошибка, которая может возникнуть после установки программного обеспечения. Если происходит «Microsoft Word Error 5981», разработчикам будет сообщено об этой проблеме, хотя отчеты об ошибках встроены в приложение. Затем Microsoft Corporation будет иметь знания, чтобы исследовать, как и где устранить проблему. Таким образом, когда ваш компьютер выполняет обновления, как это, это, как правило, чтобы исправить проблемы ошибки 5981 и другие ошибки внутри Microsoft Word.

Как триггеры Runtime Error 5981 и что это такое?

В первый раз, когда вы можете столкнуться с ошибкой среды выполнения Microsoft Word обычно с «Microsoft Word Error 5981» при запуске программы. Следующие три наиболее значимые причины ошибок выполнения ошибки 5981 включают в себя:

Ошибка 5981 Crash – это типичная ошибка «Microsoft Word Error 5981», которая приводит к полному завершению работы программы. Это происходит много, когда продукт (Microsoft Word) или компьютер не может обрабатывать уникальные входные данные.

Утечка памяти «Microsoft Word Error 5981» – этот тип утечки памяти приводит к тому, что Microsoft Word продолжает использовать растущие объемы памяти, снижая общую производительность системы. Потенциальным фактором ошибки является код Microsoft Corporation, так как ошибка предотвращает завершение программы.

Ошибка 5981 Logic Error – «логическая ошибка», как говорят, генерируется, когда программное обеспечение получает правильный ввод, но генерирует неверный вывод. Обычные причины этой проблемы связаны с ошибками в обработке данных.

Такие проблемы Microsoft Word Error 5981 обычно вызваны повреждением файла, связанного с Microsoft Word, или, в некоторых случаях, его случайным или намеренным удалением. Возникновение подобных проблем является раздражающим фактором, однако их легко устранить, заменив файл Microsoft Corporation, из-за которого возникает проблема. Кроме того, некоторые ошибки Microsoft Word Error 5981 могут возникать по причине наличия неправильных ссылок на реестр. По этой причине для очистки недействительных записей рекомендуется выполнить сканирование реестра.

Ошибки Microsoft Word Error 5981

Усложнения Microsoft Word с Microsoft Word Error 5981 состоят из:

  • «Ошибка Microsoft Word Error 5981. «
  • «Недопустимая программа Win32: Microsoft Word Error 5981»
  • «Microsoft Word Error 5981 должен быть закрыт. «
  • «Microsoft Word Error 5981 не может быть найден. «
  • “Microsoft Word Error 5981 не найден.”
  • «Проблема при запуске приложения: Microsoft Word Error 5981. «
  • «Microsoft Word Error 5981 не выполняется. «
  • “Отказ Microsoft Word Error 5981.”
  • «Ошибка в пути к программному обеспечению: Microsoft Word Error 5981. «

Ошибки Microsoft Word Error 5981 EXE возникают во время установки Microsoft Word, при запуске приложений, связанных с Microsoft Word Error 5981 (Microsoft Word), во время запуска или завершения работы или во время установки ОС Windows. Выделение при возникновении ошибок Microsoft Word Error 5981 имеет первостепенное значение для поиска причины проблем Microsoft Word и сообщения о них вMicrosoft Corporation за помощью.

Источники проблем Microsoft Word Error 5981

Проблемы Microsoft Word Error 5981 могут быть отнесены к поврежденным или отсутствующим файлам, содержащим ошибки записям реестра, связанным с Microsoft Word Error 5981, или к вирусам / вредоносному ПО.

Особенно ошибки Microsoft Word Error 5981 проистекают из:

  • Недопустимая или поврежденная запись Microsoft Word Error 5981.
  • Вирус или вредоносное ПО, которые повредили файл Microsoft Word Error 5981 или связанные с Microsoft Word программные файлы.
  • Другая программа злонамеренно или по ошибке удалила файлы, связанные с Microsoft Word Error 5981.
  • Другая программа, конфликтующая с Microsoft Word Error 5981 или другой общей ссылкой Microsoft Word.
  • Неполный или поврежденный Microsoft Word (Microsoft Word Error 5981) из загрузки или установки.

Продукт Solvusoft

Загрузка
WinThruster 2022 – Проверьте свой компьютер на наличие ошибок.

Совместима с Windows 2000, XP, Vista, 7, 8, 10 и 11

Установить необязательные продукты – WinThruster (Solvusoft) | Лицензия | Политика защиты личных сведений | Условия | Удаление

  • Remove From My Forums
  • Общие обсуждения

  • Word 2003, при попытке запустить макрос вылетает окно с сообщением “runtime error 5981 “Не удается открыть банк макросов””.
    При открытии редактора VBA (по Alt+F11) в списке Projects виден Normal.dot и аддон от Finereader6SprintTool.
    Project открытого в Word-е документа в списке отсутствует. Соответственно, макросы (содержащиеся в Normal.dot) в отношении документа не исполняются.
    Вероятные первопричины ситуации:
    1) не совсем корректно перенесшиеся с другого компьютера настройки MS Office через мастера переноса настроек (странно, в Excel аналогичной проблемы .
    2) результат выкорчевывания аддона от Adobe Acrobat Professional 8 (блокировал нормальное сохранение файлов).

    Судя по базе знаний, предлагается снести Normal.dot и Word откатиться к “заводским” настройкам. Это несколько нежелательно, поскольку Word у меня сильно “оттюнигован” – добавлено много функций, реализованных через макросы в Normal.dot. Ввводить все добавленные заново панели, кнопки и связанные с ними макросы будет трудоемко.
    Какие еще действия можно предпринять?

    • Изменен тип

      10 октября 2010 г. 6:30

Добавить комментарий