问题描述:
Hi, everyone, I made a managed COM addin for Word XP. It will load a
customized menu when word starts. And I want the Customize menu to be
available in every word document that I created.
The menu item works on the first instance of the Word document. But it
never worked again in the rest of word instances.
So I closed all word instances. Then open the word again.
Again, the first instance works, the rest of them failed.
Did anyone know how to solve this problem? I developed the solution for
Excel XP before. I followed the exact same procedure. It worked in
Excel (every instance works). But Word failed. I am so confused right
now…
Can anyone give me some hints on this?
解答:
I wasn’t assigning a unique tag to each of my buttons!
newButton.Tag = Guid.NewGuid().ToString();
Voila!
引文来源 office developer vba Word Managed Addin only loads on the first instance