Shared Addin using Word

Hello Everybody,

i have created a shared addin for word. i succeded with adding an item in the context menu of word (text context menu). The menu which appears during right click of a text.

I did that thru adding an control button on "TEXT" commandbar which is for context menu thru addin.

The problem now i am getting is the associated event for that command button which newly inserted is not firing.

If i try to add the item in some other menus say "HYPERLINK CONTEXT MENU" or "WORDART CONTEXT MENU" etc., the click event of the menu item is firing properly.

The procedure which i followed on both the cases is one and the same.

I am sure that the event handling written is also correct, but it is not firing only for the context menu of the text in the microsoft word addin.

Any thoughts on this.

thanks in advance.

Venu

[854 byte] By [VenuSridhar] at [2008-2-8]
# 1
Hi,
I've passed your question on to one of our internal support engineers, but he needs some additional information:

I have read the post, but I can not reproduce the issue.

I follow the steps of the tutorial of our KB. “How To Build an Office COM Add-in by Using Visual C# .NET” http://support.microsoft.com/kb/302901/en-us . In the sample, it adds a command button in the standard bar. We can change the ‘standard bar’ to the ‘text’ bar.

// oStandardBar = oCommandBars["Standard"];

oStandardBar = oCommandBars["TEXT"];

In the sample, it works fine.

Next step,

1. Please provide information on your development environments, for example, Office version, development language and so on.

2. Please try the solution we provided.

3. Or please provide us with the sample project to reproduce your issue.


thanks,
-brenda (ISV Buddy Team)

MSISVBuddyTeam at 2007-9-9 > top of Msdn Tech,Microsoft ISV Community Center Forums,Visual Basic for Applications (VBA)...
# 2

Hi brenda,

Thank you brenda for your effort in getting into my doubt.

Well i have cracked the issue and fixed it. The dump is we have to add the Tag option for a commandbarbutton which we are inserting in a menu item.

This is because sometimes microsoft applications feel difficult to identify which item's event is fired during a click, so we have to provide additional unique identifier in the tag property of the commandbarbutton.

I have set the Tag property for my custom menu item to a unique value, and the event is firing properly. Anybody who have their doubts related to mine can consider this option.

I have one more problem. Let me explain this.

I have created microsoft shared addin to incorporate my own custom menu feature in office application. (Word)

The Development environment includes Microsoft Professional 2000, Office 2000, .NET Platform, C# Language

The application works fine in the local machine and i have used the template which microsoft have given for shared addins.

Now if i try to install in the client machine or some other machine running my setup, it fails in creating addin for office applcations. i.e., my custom applications are not added in the client machine.

I want to develop the application for
Office 2000 or higher,
Windows 2000 or higher platforms.

Any thoughts what had gone wrong, and if there any fix, please tell me. I would be very thankful.

Thanks and regards,

Venu.

VenuSridhar at 2007-9-9 > top of Msdn Tech,Microsoft ISV Community Center Forums,Visual Basic for Applications (VBA)...
# 3
I'm glad that you were able to resolve the first issue. As for the second, please provide detailed information on the error(s) you are getting so that we can look into it for you.

thank you,
-brenda (ISV Buddy Team)

MSISVBuddyTeam at 2007-9-9 > top of Msdn Tech,Microsoft ISV Community Center Forums,Visual Basic for Applications (VBA)...