Search code examples
c#windowsms-wordms-officeribbon

Access Ribbons by id from background thread


I'm doing a Word 2007 Addin that configure some libraries. So until theses libs are not configured some buttons remains disabled.

How can I access any Ribbon element from the background thread that configure these libraries?

How, using the Office API, I can access a element using the element ID as parameter?


Solution

  • We cannot access the element directly. All change should be done using callback. The office store in cache the values. If this values are changed by others threads, this thread should invalidate the element cache, using InvalidateControl method.