Syed Raza

Hi all,

From the available default action menu items, how can we execute 'Remove This Smart Tag' action item programatically in c#

If we check the doc.SmartTags.get_Item(ref index).SmartTagActions.Count property, it returns the custom action items count. Not includes the default action items.

Looking for a way to execute the first default action item.

Thanks in advance.



Re: Visual Studio Tools for Office Executing default SmartTag Action Menu Item programatically...

Cindy Meister

A SmartTag (the marking in the document) can be removed programmatically by using the Delete method of the SmartTag object.

Please note that, strictly speaking, this question is off-topic in the VSTO forum. For questions not directly related to the VSTO technology, please consult the list of resource in the Please Read First message at the top of the forum.






Re: Visual Studio Tools for Office Executing default SmartTag Action Menu Item programatically...

Syed Raza

Thanks Cindy,

I was looking wrong way of doing this. Appreciate your reply.

The only reason for choosing this forum is VstoSmartTags.Add( ) method. The Vsto clicks me to post my question here. Well, i'll be more carefull in choosing forums next time.

Once again thanks for solving my problem.

-Syed





Re: Visual Studio Tools for Office Executing default SmartTag Action Menu Item programatically...

Cindy Meister

Hi Syed

Well, you wouldn't find a forum for this - if there were one, I'd have moved your message there with no further comment :-) Office things are still COM-based, and are still supported in the newsgroup interface, which means you won't find it through the forum interface. That's why I gave you the link to those resources :-) The group of office.developer newsgroups is usually a good place to start when interoping.