• Creating a Host Item Template

    The VSTA SDK provides samples and help topics that show you how to dynamically add host items to VSTA add-in projects. However, If you've read the topic "How to: Add and Remove Host Items in an Add-in Project", you might have been a bit confused by the following code snippet:

     

    image

     

    Where did the value of this last parameter come from? The documentation does not make this very clear, so I will quickly explain.

    This parameter refers to the location of a host item template.

    The host item template is just a file that contains code that want to appear inside of a host item class that you dynamically create.

    The code featured in the example above refers to the host item template that ships with the samples. For your application, you must create your own host item template.  Your template does not have to match the one featured in the sample.  It can contain anything that you want.

    However, you might want to make use of two replacement variables that are featured in the host item template of the sample: [!output SAFE_NAMESPACE_NAME] and [!output SAFE_CLASS_NAME]. 

    VSTA will replace these variables when you create the host item.  [!output SAFE_NAMESPACE_NAME] is replaced with the namespace of your add-in project and [!output SAFE_CLASS_NAME] is replaced with the name (first parameter) that you pass into the AddProjectHostItem() method.

    Once you have created your host item template, you can pass the location of that template to the AddProjectHostItem method to create host item classes in your add-in project.

    Norm E.

  • Learn about VSTA customer success stories and innovations in VSTA 2.0, tune into our webcast on Sep 27, 2007 at 9 AM PST

    Come join us for a webcast on September 27, 2007 at 9:00 AM PST to learn about customer success stories who are using VSTA and the innovations we have made in VSTA 2.0.

    Naveen Yajaman, Program Manager on the VSTA team will be presenting.

    For more event details and registration: http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032351235&Culture=en-US 

    In this session we will discuss customer success stories using VSTA v1.0. We will also have demos of the new features in VSTA v2.0 and some discussion around that. It will be a good forum to ask questions.

     

     

  • Learn about VSTA customer success stories and innovations in VSTA 2.0, tune into our webcast on Sep 27, 2007 at 9 AM PST

    Come join us for a webcast on September 27, 2007 at 9:00 AM PST to learn about customer success stories who are using VSTA and the innovations we have made in VSTA 2.0.

    Naveen Yajaman, Program Manager on the VSTA team will be presenting.

    For more event details and registration: http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032351235&Culture=en-US 

    In this session we will discuss customer success stories using VSTA v1.0. We will also have demos of the new features in VSTA v2.0 and some discussion around that. It will be a good forum to ask questions.

     

     

  • How to Integrate the .NET Framework SDK Documentation with VSTA

    The InfoPath team shows you how to integrate the .Net Framework help into the VSTA IDE for InfoPath. Make sure you follow the note about starting InfoPath as an administrator if you are using Windows Vista with UAC turned on (which you should be doing and is the default behavior)

    Read more here on the InfoPath team blog.

    How to Integrate the .NET Framework SDK Documentation with VSTA

     

    This blog post greatly expands upon the MSDN online help.

    http://msdn2.Microsoft.com/en-us/library/aa944989(VS.80).aspx

     

    -Paul

  • How to Integrate the .NET Framework SDK Documentation with VSTA

    The InfoPath team shows you how to integrate the .Net Framework help into the VSTA IDE for InfoPath. Make sure you follow the note about starting InfoPath as an administrator if you are using Windows Vista with UAC turned on (which you should be doing and is the default behavior)

    Read more here on the InfoPath team blog.

    How to Integrate the .NET Framework SDK Documentation with VSTA

     

    This blog post greatly expands upon the MSDN online help.

    http://msdn2.Microsoft.com/en-us/library/aa944989(VS.80).aspx

     

    -Paul

  • VSTA Video: VSTA at a glance

    Harry Miller who is a documentation writer on the VSTO and VSTA team has created a short video that looks at VSTA. This video does an excellent job at explaining at a high level (manager view) what is VSTA, what are some of the features and how it is integrated.

    Watch video.

    ShapeApp sample application.

    ShapeApp macro recording.

    ShapeApp macro generated code

     

    I also want to thank Kathleen for working with Harry to post this on her blog.

  • VSTA Video: VSTA at a glance

    Harry Miller who is a documentation writer on the VSTO and VSTA team has created a short video that looks at VSTA. This video does an excellent job at explaining at a high level (manager view) what is VSTA, what are some of the features and how it is integrated.

    Watch video.

    ShapeApp sample application.

    ShapeApp macro recording.

    ShapeApp macro generated code

     

    I also want to thank Kathleen for working with Harry to post this on her blog.

  • VSTA powers Solgenia customizations

    Solgenia is one the of first ISV customers to integrate Visual Studio Tools for Applications (VSTA) into their GeoMap software suite.

    Russ Fustino will be doing a demo of Solgenia's VSTA integration at Teched 2007 in Orlando this June.

    Read more about VSTA on Solgenia's site http://www.solgenia.com/include/read.asp?lang=&IdArt=5342&IdCat=426

  • VSTA Video: VSTA Overview

    By now you have seen Visual Studio Tools for Applications in Office InfoPath 2007 and have been wondering about how to integrate VSTA into your applications. Watch Eric and Naveen take you through the features and design goals of VSTA.

    Watch Now

  • VSTA Video: VSTA Overview

    By now you have seen Visual Studio Tools for Applications in Office InfoPath 2007 and have been wondering about how to integrate VSTA into your applications. Watch Eric and Naveen take you through the features and design goals of VSTA.

    Watch Now

  • VSTA 2005 SDK Launch Announcement

    I am pleased to announce the release of the Visual Studio 2005 Tools for Applications Software Development Kit (SDK). VSTA allows Independent Software Vendors (ISV) and enterprises to add application customization to their applications. Microsoft InfoPath 2007 has integrated VSTA. You can see VSTA in action by designing an InfoPath form and pressing Alt-Shift-F12 to launch the VSTA development environment. Think of VSTA as the managed alternative to VBA. VSTA and VBA can also run side by side within the same application so your users can create customizations in the language that makes sense for them.

    Get started today by downloading the VSTA SDK and going through the walkthrough that takes you step by step through the integration of VSTA into a sample application called ShapeApp.

    Be sure to visit the VSTA Developer Center for more details.

  • VSTA RTM's with the 2007 Office System

     

    I am excited to announce that Visual Studio Tools for Applications (VSTA) was released as an integrated component of the 2007 Office system earlier this week and is available to both Office developers and ISVs! 

     

    As Microsoft's future direction in application extensibility, VSTA provides a powerful customization toolset for ISVs, their customers, and their partners. Leveraging Visual Studio and .NET to provide managed extensibility, VSTA enables innovative customization scenarios while offering new levels of security and control. VSTA accelerates and simplifies the development of tailored solutions, helping ISVs grow their partner ecosystems and extend their market reach.  By integrating VSTA into their applications, ISVs give their customers a managed environment for tailoring applications to specific business needs.  Within VSTA, multiple configuration options offer ISVs deep control over the customization experience, and new technologies make it possible to develop more reliable, version-resilient extensions.  You can think of it as the modern, scalable, and more secure version of VBA. 

     

    This first release of VSTA makes numerous improvements over the VBA experience and includes many of the beloved VBA favorites.  Perhaps the feature most applauded by enterprise BDMs and SI’s is that VSTA customizations are seamlessly opened by any version of Visual Studio enabling professional developers to continue to enhance applications originally created by end user developers – a feature requested by many enterprises because applications often grow in sophistication over time.

     

    A brief rundown of this feature packed release of VSTA includes:

     

           Leverages the innovative Visual Studio (VS) toolset

           Multi-language support – VB and C#

           Macro Recoding

           Windows Forms designer

           IntelliSense & Code Tasks

           End-user debugging features: breakpoints, watch/auto/locals windows

           Supports connected systems development

           Web services-based development

           Fully leverages the .NET Framework

           Running and debugging 32-bit and 64-bit add-ins

           Running partial trusted add-ins

           Client and Server programming

           Common VSTA/VSTO runtime architecture for seamless up-leveling of solutions

           Graduated host integration capabilities – “use what you need when you need it”

           Low barrier to entry – get started in about two days

           Add more functionality as desired/needed over time

           Runs side x side with VBA

           Add-in Management

           Simplifies loading and unloading of add-ins

           Ability to manage application domain creation

           Host defined discovery and qualification supporting repository based scenarios

           VSTA SDK includes

           Redistributable VS based IDE and Runtime

           Integration tools

           Samples and walk throughs

           Help documentation

     

    Find out more about VSTA here, including how to download the VSTA SDK and learn about the simplified and transparent ISV pricing model.

     

    Happy Customization!

     

    KD Hallman

    General Manager

    Microsoft - Developer Division

  • VSTA RTM's with the 2007 Office System

     

    I am excited to announce that Visual Studio Tools for Applications (VSTA) was released as an integrated component of the 2007 Office system earlier this week and is available to both Office developers and ISVs! 

     

    As Microsoft's future direction in application extensibility, VSTA provides a powerful customization toolset for ISVs, their customers, and their partners. Leveraging Visual Studio and .NET to provide managed extensibility, VSTA enables innovative customization scenarios while offering new levels of security and control. VSTA accelerates and simplifies the development of tailored solutions, helping ISVs grow their partner ecosystems and extend their market reach.  By integrating VSTA into their applications, ISVs give their customers a managed environment for tailoring applications to specific business needs.  Within VSTA, multiple configuration options offer ISVs deep control over the customization experience, and new technologies make it possible to develop more reliable, version-resilient extensions.  You can think of it as the modern, scalable, and more secure version of VBA. 

     

    This first release of VSTA makes numerous improvements over the VBA experience and includes many of the beloved VBA favorites.  Perhaps the feature most applauded by enterprise BDMs and SI’s is that VSTA customizations are seamlessly opened by any version of Visual Studio enabling professional developers to continue to enhance applications originally created by end user developers – a feature requested by many enterprises because applications often grow in sophistication over time.

     

    A brief rundown of this feature packed release of VSTA includes:

     

           Leverages the innovative Visual Studio (VS) toolset

           Multi-language support – VB and C#

           Macro Recoding

           Windows Forms designer

           IntelliSense & Code Tasks

           End-user debugging features: breakpoints, watch/auto/locals windows

           Supports connected systems development

           Web services-based development

           Fully leverages the .NET Framework

           Running and debugging 32-bit and 64-bit add-ins

           Running partial trusted add-ins

           Client and Server programming

           Common VSTA/VSTO runtime architecture for seamless up-leveling of solutions

           Graduated host integration capabilities – “use what you need when you need it”

           Low barrier to entry – get started in about two days

           Add more functionality as desired/needed over time

           Runs side x side with VBA

           Add-in Management

           Simplifies loading and unloading of add-ins

           Ability to manage application domain creation

           Host defined discovery and qualification supporting repository based scenarios

           VSTA SDK includes

           Redistributable VS based IDE and Runtime

           Integration tools

           Samples and walk throughs

           Help documentation

     

    Find out more about VSTA here, including how to download the VSTA SDK and learn about the simplified and transparent ISV pricing model.

     

    Happy Customization!

     

    KD Hallman

    General Manager

    Microsoft - Developer Division

  • VBA and VSTA side by side

    One of the cool features of VSTA is that it can exist side by side with VBA in the host application. This allows hosts to slowly migrate their users to managed code over time. Summit has created a sample walkthrough showing you how to integrate VBA and VSTA into the SDK sample application, ShapeApp.

    Integrating VSTA with an Unmanaged VBA-Enabled Application

    Paul Stubbs
    Program Manager

  • Unloading an Add-In

    It has been a while since I’ve blogged, and I still haven’t delivered on my promise that I would explain how to control the AppDomain into which an add-in will be loaded.  I’m not going to deliver on that promise today, either; mostly because I think that before I can dig into some of the more advanced performance and partial-trust scenarios supported by the AddInManager, we need to talk about how to shut down add-ins that are already running.

     

    Once the add-in is loaded, all that needs to be done is to call AddIn.Unload specifying an appropriate timeout value.  Calling this method notifies the add-in that it needs to do any cleanup, and then tears down the add-ins domain.

     

    This brings us to another one of the classes in the AIM: the AppDomainBinding.  The AppDomainBinding is used to track which add-ins are loaded into which AppDomains.  For example, in the event that you do not want to unload the AppDomain after the add-in unloads, you can set the AddIn.AppDomainBinding.AutoUnload property to false.  In general, this is not a good practice, since unloading the AppDomain is the only means of unloading code in the CLR, but the functionality is there if you need it.  The reason for auto-unloading the AppDomain by default is that since an assembly by itself cannot be unloaded, we must tear down the entire AppDomain to ensure that the user’s code has stopped executing.

     

    Another interesting point about unloading is that it isn’t guaranteed to terminate.  What if the user’s code contains an infinite loop in their OnShutdown handler?  Avoiding this and other potential pitfalls caused by bugs in end-user’s code has become an entire discipline itself, so I won’t go into it here.  Suffice to say there is an easy way that you can avoid the 80% case of an add-in failing to shut down: pass a timeout value to Unload.  By doing so, the AIM executes the add-ins shutdown logic on another thread and waits for it to finish within the specified timeout.  If it does not, the thread is aborted and the AppDomain unloaded without further delay.  There are a myriad of other things that a poorly-written or malicious add-in can do to cause the hosting application to hang, but passing an appropriate timeout value should be a help in handing some of the more common errors from preventing the add-in from unloading.

     

    Aaron Hare,

    Software Developer

More Posts Next page »