Answered by:
Tag the word

Question
-
Hi All,
How to make a smart tag in word 2007. I am using VS 2005 with VSTO 3.0. I am referring the following link.
http://msdn.microsoft.com/en-us/library/ms268890.aspx
In the above link, following line is mentioned to add smart tag
this.VstoSmartTags.Add(simpleSmartTag);
but I am not getting VstoSmartTag property. What cud be the problem.
Another link(below) that I have refeered is also not working for me
http://msdn.microsoft.com/en-us/library/ms178787.aspx
Globals.Factory.CreateSmartTag( www.microsoft.com/Demo#DemoSmartTag Smart Tag", "Demonstration);
I am not getting "Factory" in Globals.
Please suggest...
Thanks...
Pankaj
Pankaj- Moved by Cindy Meister MVP Wednesday, July 28, 2010 4:42 PM VSTO project (From:Word for Developers)
Wednesday, July 28, 2010 9:24 AM
Answers
-
Hi Pankaj
Since this is a VSTO add-in and the problem is with a VSTO namespace, I'm going to move your question to the VSTO forum. That will be the better place to get help on this.
I think that the problem is the code sample on the page you reference is specific to a document-level customization. To use Smart Tags in an Add-in, you need to jump through more hoops.
Try this example, instead, and see if it works for you. (Note, even this example isn't completely correct, as it mentions ThisDocument.vb and ThisDocument.cs. It should be ThisAddin, not ThisDocument)
http://msdn.microsoft.com/en-us/library/cc442944.aspx
The other articles in the list will give you more background information on how Smart Tags function, but I believe most of the code targets document-level smart tags, so be careful!
Cindy Meister, VSTO/Word MVPWednesday, July 28, 2010 4:41 PM
All replies
-
Hi Pankaj
What kind of application are you working in? If it's not a VSTO document-level customization or a VSTO add-in, then you can't use the namespaces you mention.
If you're just creating a Smart Tag, then you have to use the Smart Tag SDK and create a DLL. But please note that the Smart Tag functionality has been "deprecated" for Office 2010 and no longer works correctly in Office 2010. So you do need to consider that before investing a lot of time and effort for a 2007 solution...
Cindy Meister, VSTO/Word MVPWednesday, July 28, 2010 9:58 AM -
Hi Cindy,
Thnks 4 ur reply...
I am developing VSTO add-in for word 2007.
Pankaj
PankajWednesday, July 28, 2010 10:07 AM -
Hi Cindy,
Since I am working on VSTO Add-in for word 2007, does it mean I shoud get those namspaces ???? or should I go for Smart Tag SDk.
Please comment.
Thanks
Pankaj
PankajWednesday, July 28, 2010 11:44 AM -
Hi Pankaj
Since this is a VSTO add-in and the problem is with a VSTO namespace, I'm going to move your question to the VSTO forum. That will be the better place to get help on this.
I think that the problem is the code sample on the page you reference is specific to a document-level customization. To use Smart Tags in an Add-in, you need to jump through more hoops.
Try this example, instead, and see if it works for you. (Note, even this example isn't completely correct, as it mentions ThisDocument.vb and ThisDocument.cs. It should be ThisAddin, not ThisDocument)
http://msdn.microsoft.com/en-us/library/cc442944.aspx
The other articles in the list will give you more background information on how Smart Tags function, but I believe most of the code targets document-level smart tags, so be careful!
Cindy Meister, VSTO/Word MVPWednesday, July 28, 2010 4:41 PM -
Hi Pankaj,
How is this issue going on in your side? Have you solved the problem?
Best Regards,
Amy Li
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.Wednesday, August 4, 2010 8:22 AM