I had originaly asked Paul Stubbs for some help regarding my project because I didn't know about these forums and he referred me here.
Simply put, I want to use C# and code an add-in for Microsoft Word and PowerPoint (and maybe more when I get to it) that creates VstoSmartTags that match words based on a Regex that I provide.
void wordapp_DocumentOpen(Microsoft.Office.Interop.Word.Document Doc)Obviously, this is psuedo-code to get across what I'm trying to do. It doesn't work. I created my project via the Extensibility template called "Shared-Add in". I have already mocked up my code using the Office template called "Word Document" but I am trying to avoid this route because (from what I understand) I'm not trying to create a single SmartDocument. I want my add-in's features to be accessible across all Word documents that a user might open.
{
Microsoft.Office.Tools.Word.Document wordDoc =(Microsoft.Office.Tools.Word.Document) Doc;
}
Thank you in advance everyone!
Mitchel

VstoSmartTags from a COM Add-In
QUE??
I've got exactly the same problem. I can't use VstoSmattags.Add in my Shared Add-in.
Could you tell me how you did it
Thanks
Per N
Hi Mitchel,
Thanks for the feedback. We realize that not having add-ins for other applications besides Outlook is a limitation and we are addressing this in the next version of VSTO. Currently, you can use the Shared add-ins to write the add-in and add your own Smart Tag using the Office exposed OM and interfaces.
Thanks.
nmd
Download the Smart Tags SDK from the following link and you should be set, just look at the examples:
http://www.microsoft.com/downloads/details.aspx FamilyID=c6189658-d915-4140-908a-9a0114953721&displaylang=en
Take care,
Mitchel
Jazzbo
Thank you for the fast response, I think that going that route is fine, it doesn't matter to me if it's a VSTO add-in vs. a Shared add-in. I think all I am missing is a good example on how to create a SmartTag via this interface.
Do you know where I can find a sample discussing how to use this
void wordapp_DocumentOpen(Microsoft.Office.Interop.Word.Document Doc)
{
Doc.SmartTags.Add(string namespace, ref object Range, ref objectProperties);
}
I'm not sure what to pass in as a "ref object Range" or a "ref objectProperites". So any pointers would be very much appreciated.
Thank you again,
Mitchel
Anil Kumar29
Thank you,
Mitchel
c#oder
Hi Mitchel,
VSTO 2005 supports only document level customizations for Word and Excel. It does not support application level add-ins in the 2005 version.
Also, you cannot use VSTO SmartTags outside VSTO customizations, so you cant use our projects to do this in this version.
Thanks.
StrickatTREEV
Mitchel,
You can not create an app-level SmartTags using Shared Addin. Instead you would need to implement ISmartTagRecognizer and ISmartTagAction interfaces, specially register those and do a lot of other things to get you going. (after you do that you will probably appreciate the ease of use provided by VSTO for doc-level smart tags :))
A good starting point would be Smart Tag SDK
http://msdn.microsoft.com/library/default.asp url=/library/en-us/stagsdk/html/stconAccess_HV01082080.asp
I hope this will help you go in the right direction for now.
Going forward we have plans to add similar SmartTags support for app-level add-ins as well.
ibhoopn
This seems to be a huge drawback of VSTO then. I know that Outlook supports the "add-in" model. Is there another way or route that I can take to implement Smart Tags via COM or some other interface This is really important to my program.
Please let me know,
Mitchel