Issue forked from Issue #90
Same error here with Outlook 2016 on Windows 10 (1703), Exchange 2016.
Outlook Google Calendar Sync.zip
2017-05-26 09:37:16,818 ERROR 1 OutlookGoogleCalendarSync.OGCSexception [0] - System.InvalidCastException: Impossible d'effectuer un cast d'un objet COM de type 'Microsoft.Office.Interop.Outlook.ApplicationClass' en type d'interface 'Microsoft.Office.Interop.Outlook._Application'. Cette op茅ration a 茅chou茅, car l'appel QueryInterface sur le composant COM pour l'interface avec l'IID '{00063001-0000-0000-C000-000000000046}' a 茅chou茅 en raison de l'erreur suivante : Interface non enregistr茅e (Exception de HRESULT : 0x80040155).
Possible fixes to try [_updated 17 Jul_]:
First things first. Have you tried running an Office Repair?
@phw198 office repair done. same problem
Are you running 64-bit Office? Could you try Hotfix-v2.4.0.4.zip which is compiled to handle 64-bit as well [see instructions for applying].
Hi @phw198,
Are you running 64-bit Office? Could you try Hotfix-v2.4.0.4.zip which is compiled to handle 64-bit as well [see instructions for applying].
Yes I'm running Office 2016 64 bits.
I've tried the Hotfix, nothing change, same error.
Same problem here, Win10 x64, Office 2016. Tried the hotfix, but since it's not installed yet, it's not really relevant. Tried the portable version too, was not working either.
I'm seeing the same problem. Windows 10, Office 360 (Outlook 2016) x64 version.
I'm on ver. 2.5.0 beta.
Could you try following through these instruction and see if that helps?
It looks like that may have solved the issue. The initial reboot after registering the dll did not throw an error, lets hop it continues working. 32/64 bit incompatibility is a struggle!
Not solved for me. Same error. I can provide logs if needed.
And we are back to square. This morning it threw the error again. My log file is attached.
OGcalsync.zip
Well that's frustrating. Btw, the log file you attached only shows successful syncs on the 19th - I'm guessing the errors returned on 20th?
That is true. I don't know why the log didn't show anything from the 20th. I've closed the program and checked the log. Now it has the correct entries. See attachment.
This is probably whats going on: System.Runtime.InteropServices.COMException: Operation unavailable (Exception from HRESULT: 0x800401E3 (MK_E_UNAVAILABLE))
I still don't see any logging of the original error 0x80040155 on the 20th.
0x800401E3 is OK and properly handled - it shouldn't be noticeable anywhere other than the log file.
Are you sure the problem isn't fixed??
Hi phw198,
I've just updated to 2.5.1. Problem isn't fixed for me. See attached debug logs
@TontonLud Just to be clear, the problem is primarily with your install of Office, will require searching Google and likely a registry fix on your computer. I say "primarily" as it _may_ be possible to perform late binding within OGCS (note to self) to workaround an unregistered interface.
Meanwhile, I can help with searching Google....maybe try Step 1 in these instructions.
Hello @phw198 ,
I've already checked my registry and everything seems to fine (see my registry export)
registry.zip
@TontonLud So something looks a bit off in your registry export:
[HKEY_CLASSES_ROOT\TypeLib\{00062FFF-0000-0000-C000-000000000046}\9.6\0\win64]
@="C:\\Program Files\\Microsoft Office\\Office16\\MSOUTL.OLB"
Mine has an extra Root directory in there:
@="C:\\Program Files\\Microsoft Office\\Root\\Office16\\MSOUTL.OLB"
Can you check if the path in your registry to MSOUTL.OLB is actually correct?
@phw198 my MSOUTL.OB file is in C:\Program Files\Microsoft Office\Office16 directory.
I don't have Root folder because it depends of the installation of Office 2016 (if you have Office 2016 or Office 365 ProPlus 2016)

@TontonLud Hang on, that screenshot is showing the file in C:\Programmes\Microsoft Office\Office 16, but your registry is referencing C:\Program Files\Microsoft Office\Office16?
In a cmd windows can you enter dir "C:\Program Files\Microsoft Office\Office16\MSOUTL.OLB" - does it find the file? If not, I think you need to repoint your registry key to C:\Programmes\Microsoft Office\Office 16\MSOUTL.OLB.
If you're registry _does_ point to a valid MSOUTL.OLB file, you could try re-registering it. You should have a file regtlibv12.exe in your .Net framework directory and the command would be something like:
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\regtlibv12.exe C:\Program Files\Microsoft Office\Office16\MSOUTL.OLB
@phw198 C:\Programmes is an alias of C:\Program Files\ because I have a french Windows 10.
The real path is for sure C:\Program Files\Microsoft Office\Office16MSOUTL.OLB
C:\Users\l.scotti.IT-MED>dir "C:\Program Files\Microsoft Office\Office16\MSOUTL.OLB"
Le volume dans le lecteur C s鈥檃ppelle OS
Le num茅ro de s茅rie du volume est CC9D-D97E
R茅pertoire de C:\Program Files\Microsoft Office\Office16
31/07/2015 09:58 424聽640 MSOUTL.OLB
1 fichier(s) 424聽640 octets
0 R茅p(s) 73聽060聽548聽608 octets libres
Ok, so looks like the registry is pointing to the right place then. Have you tried re-registering it with regtlibv12.exe?
Unfortunately, I've tried everything here, and nothing works. I still get the 0x80040155 error every time. Specifically:
I tried the solution at https://www.fieldstonsoftware.com/support/support_gsyncit_8002801D.shtml even before I joined the issue discussion here, and there is no problem with my registry. I have only one registered version, 9.6, which is correct for Outlook 2016.
I applied the solution at http://synqit.com/0x80040155-error-howto, and it made no difference whatsoever.
I tried running the Hotfix-v2.4.0.4.zip hotfix you provided, but then OGCS doesn't execute at all.
My current version is 2.6.1 alpha.
However, I don't understand your last post that says, "Have you tried re-registering it with regtlibv12.exe?", so I haven't tried that. Could you please clarify what that means?
Yeah, I wouldn't apply the hotfix 2.4.0.4 to 2.6.1 :-)
My last post was referencing my previous post which also provided an example command to execute.
Thanks for the response, but:
My registry key \HKEY_CLASSES_ROOT\Wow6432Node\TypeLib{00062FFF-0000-0000-C000-000000000046}\9.6\0\Win64 correctly points to the valid file "C:\Program Files\Microsoft OfficeRoot\Office16MSOUTL.OLB". There doesn't seem to be any problem there.
I have no regtlibv12.exe file anywhere on my computer, even though I do indeed have a .NET folder "C:\Windows\Microsoft.NET\Framework64\v4.0.30319", so I can't try to re-register as you suggested.
I'm sorry that you're spending so much time on this, but I really do appreciate it. Do you have anything else I might try?
Looks like reglibv12.exe can be downloaded here.
Could you also search your registry to see if there are any other keys that reference msoutl.olb - maybe that are pointing to a non-existent file location or are a key for a different version of Office.
Voil脿! The reglibv12.exe finally worked! Specifically:
I downloaded the reglibv12.exe file from the link you gave me and placed it into the "C:\Windows\Microsoft.NET\Framework64\v4.0.30319" folder.
I executed the command:
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\regtlibv12.exe "C:\Program Files\Microsoft Office\root\Office16\MSOUTL.OLB"
(Actually I initially got an error message, until I executed cmd.exe in admin mode by pressing shift then right-clicking on the Window menu in the bottom left corner.)
With successful execution of reglibv12.exe from cmd.exe in admin mode, OCGS finally works.
(On a side note, to respond to one of your questions, I searched my registry, and the only reference to msoutl.olb is HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WOW6432Node\TypeLib{00062FFF-0000-0000-C000-000000000046}\9.6\0\Win64, which has "C:\Program Files\Microsoft Office\root\Office16MSOUTL.OLB" as its default value; this is the valid location of the only msoutl.olb in my system.)
Thanks again for your help!
Fantastic! A break through finally! If @TontonLud can confirm the solution works for him too, then I think we have a fix 馃
@phw198 @Tripartio it works !
hi guys
Thanks a lot for the follow-up.
I also confirm that with the process given by @Tripartio it's the first time I can open OGS! no COM alert anymore! 馃
A summary of the fix has now been included in the wiki.
Most helpful comment
Voil脿! The reglibv12.exe finally worked! Specifically:
I downloaded the reglibv12.exe file from the link you gave me and placed it into the "C:\Windows\Microsoft.NET\Framework64\v4.0.30319" folder.
I executed the command:
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\regtlibv12.exe "C:\Program Files\Microsoft Office\root\Office16\MSOUTL.OLB"(Actually I initially got an error message, until I executed cmd.exe in admin mode by pressing shift then right-clicking on the Window menu in the bottom left corner.)
With successful execution of reglibv12.exe from cmd.exe in admin mode, OCGS finally works.
(On a side note, to respond to one of your questions, I searched my registry, and the only reference to msoutl.olb is HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WOW6432Node\TypeLib{00062FFF-0000-0000-C000-000000000046}\9.6\0\Win64, which has "C:\Program Files\Microsoft Office\root\Office16MSOUTL.OLB" as its default value; this is the valid location of the only msoutl.olb in my system.)
Thanks again for your help!