Limitations of VSTO Smart tags.
使用VSTO智能标记的一些限制。
Calling Into a VSTO Add-in From a COM Smart tag-is It Possible?
从一个COM智能标记里调用VS TO插件是可能的吗?
VSTO smart tags can be used only in document-level projects for Excel and Word.
VS TO智能标记只能够使用在Word或者Excel中的文档级别的项目中。
Although VSTO smart tags are easy to implement, they do have several limitations.
尽管实现VS TO智能标记很容易,但它确实有些限制。
The second method Beth Massi describes is calling VSTO code from within VBA macros.
Beth Massi描述的第二种方法就是从VBA宏调用VSTO代码。
You can now use the resulting assembly in any VSTO project that supports the Ribbon.
现在在其他的VS TO项目中就可以使用生成的程序集来增加功能区的支持。
Finally, add a reference to the class library assembly from within any VSTO project and voila.
最后,在其他VS TO项目添加对这个类库项目(或者生成的程序集)的引用。
This means interoperability between VSTO and VBA is going to be vital for several years to come.
这意味着VSTO和VBA之间的互操作性在未来的几年变得至关重要。
The easiest is to simply call the VBA macro from within VSTO by using the Application.Run method.
最简单的就是使用应用程序在VSTO中调用VBA宏。
Then you can use the GetManagedClass function to access the VSTO methods and properties you exposed.
接着,你才可以使用GetManagedClass函数来访问VSTO方法和属性。
Because of these issues, there is not much of a benefit to implement a COM smart tag in a VSTO add-in.
因为存在这些问题,在VSTO外接程序里实现一个COM智能标记是一件吃力不讨好的事情。
All of these prerequisites can be configured through the setup project for the add-in you create in VSTO.
所有这些前提条件都可以从你在VS TO里创建的加载宏的安装工程里配置。
Even if you cannot use VSTO to create a smart tag, you can still use features in a VSTO add-in from the smart tag.
即使你不用VSTO创建智能标记,你仍然能够使用VSTO外接程序里智能标记的一些特性。
Before you can do this, the EnableVbaCallers property must be set, which will cause the VSTO code to be registered for COM interopt.
在这之前,必须设置enablevbacallers属性,使得VSTO代码注册COMinteropt。
VSTO smart tags also cannot be used in projects for any other Office application that supports smart tags, such as PowerPoint and Outlook (when composing e-mails with Word as the E-mail editor).
VS TO智能标记也不能用于其它的支持智能标记的Office产品中,比如PowerPoint和Outlook(撰写邮件时使用了Word作为编辑器)。
The document-level projects for Excel and Word in VSTO (in Visual Studio 2005 and Visual Studio 2008) provide a simple object model that you can use to create smart tags for documents and workbooks.
在VS2005和VS2008中,创建Excel 和Word文档级别的工程时,VSTO提供简单的对象模型让你为文档或工作薄创建智能标记。
The document-level projects for Excel and Word in VSTO (in Visual Studio 2005 and Visual Studio 2008) provide a simple object model that you can use to create smart tags for documents and workbooks.
在VS2005和VS2008中,创建Excel 和Word文档级别的工程时,VSTO提供简单的对象模型让你为文档或工作薄创建智能标记。
应用推荐