Page 1 of 1

Tm1 pax - IBM Cognos Office Automation outside VBA

Posted: Thu Oct 11, 2018 6:19 am
by kavitha2002
Hello Everyone,

I would like to call the APIs for Pax outside VBA. Refer the below link
Want to do the same in vb.net. But not clear what is "To use IBM Cognos Office Automation outside VBA, you must create wrapper macros in the Microsoft Office document for each API. You can then call these macros from your code." in the above link. Not clearly understood. Guide me how to implement this.

Any suggestions kindly get back.

Thanks.

Re: Tm1 pax - IBM Cognos Office Automation outside VBA

Posted: Thu Oct 11, 2018 11:30 am
by bgregs
What exactly are you struggling with for the wrapper creation? There is a very clear example listed in the IBM documentation you provided. If there's a specific question about the code I'd be happy to help, but from my standpoint that example was very clear.

Re: Tm1 pax - IBM Cognos Office Automation outside VBA

Posted: Thu Oct 11, 2018 1:42 pm
by kavitha2002
I am using vb.net app for the handling excel objects and tm1 reports. So I though of rewriting the .bas file in vb.net and call the automationserver.logon() from vb.net.
My code in vb.net is excelobj.COMAddIns.Item("CognosOffice12.Connect").object.AutomationServer which should return Cognos.Office.Framework.Automation.AutomationServer object but gives the below exception

Exception as "Automatioserver available only on STA."