1

I am writing a c# application to get data from excel where the data comes from an excel Reuters Addin.

The Reuters addin creates two excel Ribbons (menu tabs next to "Home", "Insert", etc.) "Thomson Reuters Datastream" and "Thomson Reuters".

In order to use the Retuers addin functions in excel, I first need to press the "Logon" button in the "Thomson Reuters Datastream" ribbon (so that it is green and says "Online" instead of red and "Offline") because it needs to be "Online" or else the Reuters addin functions won't work.

How can I push this button (access the Ribbon and make sure the Logon button is "Online", if not then press the button) from c#?

I am comfortable creating an Excel Application object in C# and manipulating cells etc but don't know how to press an addin's ribbon button.

Any help/guidance is much appreciated!

Thank you!

Alex
  • 45
  • 2
  • 7

2 Answers2

0

I dont think it is possible with custom addins, if it is built in tab then you can use

Application.CommandBars.ExecuteMso()

For automating controls in custom ribbon tabs this might help you

Automate Office Ribbon through MSAA (CSOfficeRibbon​Accessibility)

Kiru
  • 3,489
  • 1
  • 25
  • 46
0

Found an option built into the addin to set it to always logged in thus don't need to manipulate the addin's ribbon but would be interesting if anybody comes across a solution

Alex
  • 45
  • 2
  • 7