![]() |
|
|||||||
|
|
|
Thread Tools | Display Modes |
|
|
|
#1
|
|||
|
|||
|
The ribbon is an application object, not a document object.
Your code needs to handle the DocumentChange event so that you can refresh the ribbon when the active document changes. Your toggle buttons also need to have GetPressed callbacks so that the button reflects the current state of the property that is being toggled. |
|
#2
|
|||
|
|||
|
Thanks a lot Guessed and Italophile!
I will do some more testing and keep you posted! - Italophile, yes the ribbon should be an application object and that's why I was surprised by the behavior I encountered. I'll move some lines of code to my App_DocumentChange event. As for the getPressed and getEnabled callbacks, after trying the same code in each, I have no change. - Guessed, yes we will do that if I can't optimize my current code. The solution in the meantime that I have, is the following: for each opened document I have a unique temporary variable, in which is indicated the TB activated for this document. If I change the document on the screen, I take the value of the temporary variable of the document and I activate its TB... with that I don't have any problem but it's true it's a DIY. Have a nice day, David |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Is it possible to choose another NORMAL.DOTM in WORD as template for merge documents using VBA?
|
DDouma1964 | Word VBA | 1 | 08-17-2022 08:18 AM |
| Automatic link creation, after writing: Link text in main body (multiple instances) | mike_302 | Word VBA | 2 | 07-05-2021 12:28 AM |
Word Custom Ribbon In .dotm - How to edit/create?
|
s0me0nesmind1 | Word | 6 | 04-16-2020 04:10 PM |
Create custom quote based on template
|
torma156 | Word | 3 | 09-06-2015 11:04 AM |
Documents hung up, Word won't close due to "Changes made..to global template Normal.dotm"
|
pagskg | Word | 2 | 07-23-2014 12:54 PM |