RE: Losing menu events
- From: David Thielen <thielen@xxxxxxxxxxxxx>
- Date: Tue, 30 Oct 2007 10:46:02 -0700
Hi;
Yes, this is the same problem I posted on earlier. I'm hoping that there is
more information about this now available.
The IRibbonExtensibility is only in there fore the Word 2007 build - sorry.
It is not in the Word 2000, 2002, & 2003 builds. The problem only exists with
Word 2000/2002/2003.
Yes, the events that are no longer firing are the ones set with
(((CommandBarButton)buttonMenus[ind]).Click += buttonOn.handler; The menus
are still there, but clicking on the menu selections does nothing.
For the double click I do:
ApplicationEvents3_Event aee = (ApplicationEvents3_Event)applicationObject;
aee.WindowBeforeDoubleClick += Event_WindowBeforeDoubleClick;
which is a different event handler than the menu ones.
The variables:
private readonly CommandBarPopup[] popupMenus = new CommandBarPopup[5];
private readonly CommandBarControl[] buttonMenus = new CommandBarControl[26];
are instance variables in an object (called CommandMenu). That object is
instantiated in the Connect.cs constructor.
The dispose code just gets rid of our licensing thread - nothing to do with
the menu:
public void Dispose()
{
Trap.trap();
license.Dispose();
}
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"Jialiang Ge [MSFT]" wrote:
Hello Dave,.
From your post, my understanding on this issue is: you word add-in's menu
events are gone after you open 2 documents and close the first one. If I'm
off base, please feel free to let me know.
Firstly, would you help me to confirm if it is the same issue as you posted
in 2007/07/28 "Losing Word Events"? In that post, you also mentioned that
the add-in loses the events when the first of the 2 instances of Word 2003
is closed.
So it is in the Connect object. This object lasts the lifetime of theYes, you are right. It lasts the lifetime of the Add-In and the menu object
AddIn - correct? So the member object that contains the menu
object will still exist after a document is closed - correct?
should still exist after a document is closed.
I notice that you are implementing IRibbonExtensibility interface in your
Connect class. IRibbonExtensibility is for Office 2007. In your last post,
you said the add-in is for Word 2003. Would you help to confirm if the
issue exists when Office 2007 features are not introduced, so that we could
narrow the focus.
You said that the add-in is still loaded and the double click handler still
works. What is the double click handler for? Is it also bound to a menu
button (open/close/etc)? What do you mean by the menu events? Are they
referring to the Click event of the menu buttons?
(((CommandBarButton)buttonMenus[ind]).Click += buttonOn.handler;) or do you
mean that the new menu button could not even be shown?
You also said that "the menu objects I get from Word are stored in an
object that is created in my Connect.cs class", what do you mean by the
'object'? Is the the popupMenus and buttonMenus?
The last question, you implement IDisposable interface. How do you write
the Dispose method?
Please let me know the information above so that I could have a clearer
picture of the issue.
Sincerely,
Jialiang Ge (jialge@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support
==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document: http://blogs.msdn.com/msdnts/pages/postingAlias.aspx
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
- Follow-Ups:
- RE: Losing menu events
- From: Jialiang Ge [MSFT]
- RE: Losing menu events
- References:
- RE: Losing menu events
- From: Jialiang Ge [MSFT]
- RE: Losing menu events
- Prev by Date: Re: DocumentBeforeSave Event
- Next by Date: RE: cellXfs & cellStyleXfs
- Previous by thread: RE: Losing menu events
- Next by thread: RE: Losing menu events
- Index(es):