![]() |
|
#5
|
|||
|
|||
|
Here is a possible solution to adapt it. It seems to work (see in time)
Here are the lines I modified to adapt them to Word So I put in the declaration : Private Declare PtrSafe Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As LongPtr) In: Sub RibbonLoaded_MyCustomAddin(ribbon As IRibbonUI) ThisDocument.Variables("RibbonID") = StoreRibbonPointer ThisDocument.Saved = True In: Sub RefreshRibbon() I deleted: 'Dim objRibbon As Object I put this: Set objRibbon = GetRibbon(Replace(ActiveDocument.Variables("Ribbon ID"), "=", "")) Now I can call "Call RefreshRibbon" it seems where I want, in my case in the Callback of onAction of my ToggleButtons. For the moment it seems to work and moreover I can modify on the fly the vba code of the Ribbon without it crashing either! ( |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Upgrading from Trial Version - don't want to lose notebooks! | HyperNote | OneNote | 0 | 05-01-2017 04:24 AM |
Font will not lose Italic. Corruption?
|
Ulodesk | Word | 2 | 07-25-2016 06:01 AM |
| How can I embed a word document so I don't lose the links therein | Dracven | Outlook | 2 | 03-31-2014 04:02 AM |
| How do I lose these dotted lines? | jlumbtx | Word | 4 | 11-09-2013 10:29 PM |
Lose formatting when copying text
|
shadox | Excel | 1 | 07-31-2012 08:50 PM |