none
VSTO setting up successfully? RRS feed

  • Question

  • Please forgive my simplistic question as I'm a newbie to VSTO (although I've being using feature like VSTO with VB6 for quite a while...)

    I'm using VS2005, .NET Framework 2.0 and programming in visual basic. My question is how can I know if my VS2005 is properly set up for use with VSTO?

    I ask this question becasue I'm been reading Eric Carter/Eric Lippert's book on VSTO using VB2005 lately but can't repeat what he taught in the text.  (precisely when I type, for example, workbook=Me.application.workbooks.open(path) there was an error reported by VS2005..

     

    Thanks a lot for your help.

     

    Tony

    Sunday, October 5, 2008 3:37 AM

Answers

  • Hi Tony

     

    In order to use the Visual Studio Tools for Office they must be part of your Visual Studio product. If you have VS 2005 Team Suite they are part of the product. Otherwise, you had to have bought the separate VSTO product package.

     

    In Visual Studio 2008 they are part of the Professional and higher editions.

     

    VSTO also requires Office 2003 PROFESSIONAL (or higher), or the stand-alone Word and Excel product packages. Only these editions contain the necessary XML features VSTO plugs into.

     

    You can tell whether VSTO is installed on your machine (no matter which edition of Visual Studio 2005 you may have) by trying to create a new Word document or Excel workbook project. If you don't find these templates under the Office folder (or, indeed, don't find the Office folder) then VSTO isn't installed.

     

    Please note that it's possible to automate Office applications, just as you did with VB6, without VSTO being installed. You can, for example, design a Winforms application that opens Excel and manipulates a workbook. You can more or less transfer everything to do with the object models 1:1 from VB6 to VB.NET (as long as Option Strict Off is set, and with some small exceptions). The code will not be the same as you see in the Carter/Lippert book or the samples in VSTO documentation. That's because VSTO

    - runs in-process with the application (like VBA or a COM Add-in)

    - extends some objects in the object models

     

    So, while the Carter/Lippert book can offer you some useful information and insights, there's a lot you won't be able to use unless you have the Tools.

    Sunday, October 5, 2008 11:03 AM
    Moderator

All replies

  • Hi Tony

     

    In order to use the Visual Studio Tools for Office they must be part of your Visual Studio product. If you have VS 2005 Team Suite they are part of the product. Otherwise, you had to have bought the separate VSTO product package.

     

    In Visual Studio 2008 they are part of the Professional and higher editions.

     

    VSTO also requires Office 2003 PROFESSIONAL (or higher), or the stand-alone Word and Excel product packages. Only these editions contain the necessary XML features VSTO plugs into.

     

    You can tell whether VSTO is installed on your machine (no matter which edition of Visual Studio 2005 you may have) by trying to create a new Word document or Excel workbook project. If you don't find these templates under the Office folder (or, indeed, don't find the Office folder) then VSTO isn't installed.

     

    Please note that it's possible to automate Office applications, just as you did with VB6, without VSTO being installed. You can, for example, design a Winforms application that opens Excel and manipulates a workbook. You can more or less transfer everything to do with the object models 1:1 from VB6 to VB.NET (as long as Option Strict Off is set, and with some small exceptions). The code will not be the same as you see in the Carter/Lippert book or the samples in VSTO documentation. That's because VSTO

    - runs in-process with the application (like VBA or a COM Add-in)

    - extends some objects in the object models

     

    So, while the Carter/Lippert book can offer you some useful information and insights, there's a lot you won't be able to use unless you have the Tools.

    Sunday, October 5, 2008 11:03 AM
    Moderator
  • Thank you very much Cindy...

    When I open a new project in Visual Studio, I saw a tag of 'Office' under which there are 2 choices of 2003 add-in and 2007 add-in, and in the right hand pane there are choice of
    Visual stuido installed templates like excel add-in etc.. so sound like the VSTO is installed.

    I'm very interested on the details of automating office application which you mentioned in the last 2 paragraphs.  Can you let me know where can I find more information on the subject?

    Tony

    Wednesday, October 22, 2008 10:49 AM
  • So, I'm in a similar position except that I do not have the the 'Office' tag when I make a new project in Visual Studio. 

    I'm running Visual Studio 2005 Professional and Office 2007 Enterprise.  So, theoretically i should have VSTO installed...right?  Add/Remove Programs indicates that Visual Studio 2005 Tools for Office Second Edition Runtime is installed. 

    Clearly I'm missing something since I don't have the option in the New project window of Visual Studio, but I'm at a loss of how to go about fixing this.  Any insight would be greatly appreciated.  Thank you.

    -S
    Sunday, April 12, 2009 9:28 PM
  • The VSTO 2005 SE runtime just lets you run VSTO solutions. To create VSTO solutions in Visual Studio, you must install the full VSTO 2005 SE package available here: http://www.microsoft.com/downloads/details.aspx?familyid=5E86CAB3-6FD6-4955-B979-E1676DB6B3CB&displaylang=en


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Monday, April 13, 2009 6:15 PM
    Answerer