an error occurrred in CTPFactoryAvailable on other computers

Dec 16, 2015 at 9:49 AM
Hi All,

I've been using NetOffice to develop an Outlook 2013 plugin. Since I am using the WordEditor as well, I selected Outlook and Word in the developer toolbox, and at the end I selected to Customize the Ribbon and that I want to add a Task Pane.

Now when the project is originally created, I had to make some modifications for the plugin to show up in outlook, and I ended up with this code:
<COMAddin("Moist", "My Outlook Integrated Support Tool", 3), ProgId("Moist.Addin"), Guid("3C0FB897-8026-4AD3-8599-4DFCA3FF873E")>
<RegistryLocation(RegistrySaveLocation.CurrentUser), CustomUI("Moist.RibbonUI.xml"), CustomPane(GetType(MyTaskPane), "My TaskPane", True, PaneDockPosition.msoCTPDockPositionRight)>
also I changed the inherits to:
Inherits Outlook.Tools.COMAddin
Now when I registered the DLL with RegAsm.Exe it showed up in outlook perfectly, even the task pane.

I created all the functions I needed, and then zipped all the assembly and all other DLLs.

When I tried to register the Assembly on another computer (same windows, same version of outlook) when the user starts outlook the following error message appears:
an error occurred in CTPFactoryAvailable
I did a mad search, but found no such function (or word) in my solution in VS Express. I did some Googling, and found that this function is in the IEXtensibilty examples, so I guess it's part of the DLLs accompanying my assembly.

Do you guys have any idea, why I would get the task pane error? It seems to work perfectly on my computer, and I used the exact same DLLs in the Debug Folder on the other computer.

I created a new project, just with the task pane, completely blank and tried that on the other computer, still nothing, I just get the "an error occurred in CTPFactoryAvailable" when outlook launches.

Any help would be much appreciated.

Many thanks,
Krisz
Dec 16, 2015 at 10:26 AM
Just a quick update, I tested in on multiple computers, and I get the same error.
Coordinator
Dec 16, 2015 at 11:07 PM
can you show me the exception details please?

*Sebastian
Dec 17, 2015 at 6:50 AM
Hi Sebastian,

Here is the exception:
System.Runtime.InteropServices.COMException (0x80004005): See inner exception(s) for details. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException: Unable to create specified ActiveX control.
--- End of inner exception stack trace ---
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at NetOffice.Invoker.MethodReturn(COMObject comObject, String name, Object[] paramsArray)
at NetOffice.Invoker.MethodReturn(COMObject comObject, String name, Object[] paramsArray)
at NetOffice.OfficeApi.ICTPFactory.CreateCTP(String cTPAxID, String cTPTitle)
at NetOffice.OutlookApi.Tools.COMAddin.CTPFactoryAvailable(Object CTPFactoryInst)
Thank you for the quick response! :)
Coordinator
Dec 18, 2015 at 6:14 AM
Outlook failed to create an instance of MyTaskPane.

You say it works fine on your dev system. For me now, its an exception in the ctor of your pane or in a corresponding event trigger or last but not least, a dependent assembly is missing. (please keep in your mind: CLR bind referenced assemblies while first access-on demand - may you use something special in your task pane)

you can send me a simplified version of your project to public.sebastian[at]web.de and i want see how it works in my virtual machines.(remove any private code if you want but keep all assembly references alive)

*Sebastian
Dec 18, 2015 at 10:40 AM
I used the standard project created by the Developer Toolbox, haven't even added anything to the taskpane yet. I created another blank project with the only customization changing:
Inherits Word.Tools.COMAddin
to
Inherits Outlook.Tools.COMAddin
I'll send you an email of both the VB Project, and a zip files of the assemblys I copied over.

Million thanks for your help.

Many thanks,
Krisz
Jan 4, 2016 at 10:15 AM
Many thanks Sebastian for your software. Just to note the following:-

I'm finding the same error as described above on one of my machines - Windows 10 64 bit with Outlook 2010 64 bit.

But this error does not appear on my other machine - Windows 10 64 bit with Outlook 2010 32 bit - the addin loads and the task pane appears.

Many thanks for your work,

Michael