Ok so this is a fresh install of windows 8.1 on a new machine in our office. We installed Office Professional Plus 2013 on it and everything looks rosy. However, I get the following error:
Everything I've researched says that there's a old outlook value in the registry. 9.3, 9.4 etc. However this computer has never had anything but Outlook 2013 on it and every registry value I can find is 9.5.
I am developing an app that pre-writes a standard email we send when we send clients an update. in C# the relevant code looks like this:
string Body = Head + FileList + details + EmailPart + Signature;
Outlook.Application OLapp = new Outlook.Application();
MailItem eMail = OLapp.CreateItem(Outlook.OlItemType.olMailItem); //this is the line that causes the error.
eMail.Subject = "subject";
eMail.To = "";
eMail.HTMLBody = Body; //text created above
eMail.Importance = OlImportance.olImportanceNormal;
eMail.Display();
This works on every machine in the office except this 64bit W8 box. I'm at a loss, I've repaired and reinstalled the Professional Plus 2013 package to no avail. The com object should register on istall, there's no way I've found to register it manually. I've tried targeting X86 in VS to no avail. I've been hammering on this issue for a couple of weeks now so I'm stumped. Has anyone resolved this issue where it wasn't a Value: 9.3/9.4 Registry issue?
Maybe there's a way to do this that doesn't use COM instead using a dll? Anything to get this user off the ground would be helpful. Thank you.
SOLVED!
Thanks to an answer posted here I was put on the right track for finding my solution.
In short the issue is not that there are multiple keys or invalid keys in the registry, it is that there is a key missing in a specific location in the registry. Specifically in HKEY_CLASSES_ROOT\TypeLib\
In long: My error pointed me towards a key {0006001-0000-0000-C000-000000000046} Everything I could find online then pointed towards the key HKEY_CLASSES_ROOT\Interface{0006001-0000-0000-C000-000000000046}
The most common issue is when you have multiple version entries, 9.5,9.4 etc. You have to remove the versions that are invalid. For my issue there was only one version, 9.5.
I searched for other {0006001-0000-0000-C000-000000000046} entries and every one of them only had one version, 9.5
What the answer linked above wanted me to do was to remove invalid versions in HKEY_CLASSES_ROOT\TypeLib{0006001-0000-0000-C000-000000000046} One problem though... the key did not exist. AHA!
I created the key manually using HKEY_CLASSES_ROOT\TypeLib{00062FFF-0000-0000-C000-000000000046} (A key that referenced the MSOUTL.OLB that my program uses) to build out the missing key. (I don't know of a way to copy an entire key in regedit)
Once I had done that I needed to restart the computer, once restarted the program works flawlessly.
Apparently Office365 misses this location during the install. Thankfully I can put this nearly month long plague that started with me questioning my code behind me! Hope this helps someone else in the future!
My case was this key: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib{00062FFF-0000-0000-C000-000000000046} had both Win32 and Win64 subkeys defined, while I had only 64 bit Office installed, so deleting Win32 subkey fixed the problem.