mirror of
https://github.com/Set-OutlookSignatures/Set-OutlookSignatures.git
synced 2026-04-26 10:45:52 +03:00
[GH-ISSUE #36] Error from WINWORD, library not registered #12
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Set-OutlookSignatures-Set-OutlookSignatures#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Imaginos on GitHub (Apr 14, 2022).
Original GitHub issue: https://github.com/Set-OutlookSignatures/Set-OutlookSignatures/issues/36
Originally assigned to: @Imaginos on GitHub.
Hi Markus !
On a few bunch of machines (Win 10, Office 2013) the script raises an error when Word has to open the docx model and process it to create the signatures.
'Get all OOF template files and categorize them @2022-04-13T09:51:29+02:00@
Start Word background process for template editing @2022-04-13T09:51:29+02:00@
Word not installed or not working correctly. Exiting.
Exception lors de l'appel de «Quit» avec «1» argument(s): «Impossible d'effectuer un cast d'un objet COM de type
'Microsoft.Office.Interop.Word.ApplicationClass' en type d'interface 'Microsoft.Office.Interop.Word._Application'.
Cette opération a échoué, car l'appel QueryInterface sur le composant COM pour l'interface avec l'IID
'{00020970-0000-0000-C000-000000000046}' a échoué en raison de l'erreur suivante: Bibliothèque non inscrite.
(Exception de HRESULT : 0x8002801D (TYPE_E_LIBNOTREGISTERED)).»
Au caractère C:\Logiciels\Set-OutlookSignatures\Set-OutlookSignatures.ps1:1486 : 17
+ $script:COMWordDummy.Quit([ref]$false)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : InvalidCastException
Clean-up @2022-04-13T09:51:30+02:00@'
I think this issue is MS related, but have you ever heard about this and what to do ?
Of course, I tried lots of things (including the use of a MS tool aimed to make a full clean of Office prior to reinstall it...
Thanx Markus !
@GruberMarkus commented on GitHub (Apr 14, 2022):
Hi Imaginos
You are right, this problem is a problem in Word or the Office Interop itself.
I have not seen this error with Word and Set-OutlookSignatures, but with Excel. It was not caused by Excel or Office itself, but by a third-party product wrongly handling Office Interop registry keys.
If repairing and reinstalling do not help, I'd try the following steps:
taskkill /f /im winword.exe
Start Word and see if it asks for document recovery. If yes, this might be the root of the problem
If this does not help, you'll need to compare registry entries for '{00020970-0000-0000-C000-000000000046}' between a working and a non-working client computer.
@Imaginos commented on GitHub (Apr 15, 2022):
Yes !
The solution is quite simple !
In regedit, i found \HKEY_CLASSES_ROOT\Interface{00020936-0000-0000-C000-000000000046}\TypeLib with a default value set to {00020905-0000-0000-C000-000000000046}.
Then I go to \HKEY_CLASSES_ROOT\TypeLib{00020905-0000-0000-C000-000000000046}\ and find 2 sub keys : 8.6 and 8.7
8.7 was empty and should not be. I deleted this empty key, leaving 8.6 with it's data.
After that, the script works fine (no need to reboot or anything else) !
Hope it will help if someone else encounter this (it seems to happen more often than it should).
Bye,
Tom
@Imaginos commented on GitHub (Oct 11, 2022):
OK Markus, I'll try to explore the registry. I already tried the rest :)
I'll let you know, it can be useful !
See ya
Tom
Le jeu. 14 avr. 2022 à 17:21, Markus Gruber @.***> a
écrit :