none
VSTO, Visual Studio 2005 Standard and Office 2007 (No Office Project Available) - Guidence Needed, Please Help. RRS feed

  • Question

  • Hello

    I am currently attempting to enable development of Office projects within VS 2005.

    After a search of MSDN I found that I need to Install VSTO 2005 (Latest Edition) and also the Office Primary Interop Assemblies.

    I installed both (the Interop first), and then started VS 2005 hoping to be able to create an VB (or VC++) Office Project.

    Unfortunately no Office project options appeared under the New Project window.

    So then, on the advice of a few web articles, I went back and repaired both my Office 2007 and VS 2005 (in that order) installations, and then tried again.

    Failed to appear agin ....

    Finally I uninstalled the Interop and then reinstalled them, and did the same with VSTO.

    Failed once again.

    I was hopeing someone here might be able to provide me with some guidence, as to what I am missing here ?

    I could really do with the help about now.

    Thanks for reading.

    PS Although I can confirm the Interop Assemblies are being installed (through Control panel), I could not find any reference to the VSTO in either the Updates or Programs section of control panel. That may in its self mean nothing but I thought I should mention it nonetheless. The installation did apparently complete successfully.

    FYI : I am using Windows 7, Visual Studio 2005 Standard and Office 2007 (Home and Student).

    Monday, September 13, 2010 1:37 PM

Answers

  • Hi Gabriel

    << I am using Windows 7, Visual Studio 2005 Standard and Office 2007 (Home and Student).>>

    The problem is that Visual Studio Standard does not contain or support Visual Studio Tools for Office. Only VS 2005 Professional (or higher) provides support for VSTO.

    In addition, in VS 2005 VSTO was a separate package you had to purchase in order to get the document and workbook templates for document-level customizations. Or you had to have VS 2005 Team Suite. For VS 2005 only the free VSTO 2005 SE download was available, giving you templates to create VSTO Add-ins. But this does not install in editions below VS 2005 Professional.

    My recommendation would be you upgrade to Visual Studio Professional 2010 if you want to create VSTO projects for Office 2007.


    Cindy Meister, VSTO/Word MVP
    Monday, September 13, 2010 3:00 PM
    Moderator
  • <<I would also like to use the Visual Studio IDE, as the editor in VB's constant whining about an error every time you shift the cursor out of an incomplete statement is driving me around the bend.>>

    <ROFL>I so sympathize. I can help you with that, at least: Tools/Options/Editor. Deactivate AutoSyntaxCheck.

    <<VB Excel (not sure if that is the right terminology).>>

    Excel VBA is the more common usage :-)

    <<1. Is there a VSTO for VS 2010 Express ? (Or only for the commercial versions. If so what is the minimum version of VS 2010 that needs to be purchased to allow whatever the 2010 equivalent of VSTO is)>>

    VS 2010 Professional is the minimum edition that contains VSTO. It supports projects for Office 2007 and 2010 (but not for creating solutions for Office 2003).

    <<2. Based on what I have provided will using your previous suggestion enable me to fullfil my requirements (data validation, automatic range (et al) generation, some extra visual input elements) or do I need something akin to VSTO for 2010 ?>>

    Mmm. VSTO doesn't do anything a really top-flight developer with in-depth COM and Office knowledge couldn't do. But it certainly makes it loads easier as it takes care of all the "plumbing". Rolling your own probably wouldn't be as difficult as re-creating Excel from the ground up, but you get my drift :-)

    <<in addittion I assumed there would be greater functionality and better help.>>

    Better help, no, definitely not. The VBA help (especially in older versions) is still more thorough than any Help files in ".NET speak". And your best resource for anything "How to" related to Excel itself or its object model will be an Excel-specific forum. (There's an Excel Developer forum on MSDN and various end-user targeted forums on the "Answers" site:http://social.answers.microsoft.com/Forums/en-US/group/Office) What they're generally not so good at is giving you .NET code, but since you "speak" VBA you should be able to communicate with them OK. There are a number of us "roaming" that can help with "translation", should it be necessary.

    for questions having to do with VSTO, specifically, this is certainly the right place to ask, which brings us to...

    <<I just want to be able to perform some more sophisticated data validation then Excel natively allows, provide some more funtionaly visual input devices (ie drop down boxes etc) then straight Excel (without VB) allows, and automatically generate some content (ranges in particular) as data may be added from time to time. The spreadsheet in question serves as both a reference, like a mini-database, and a calculation device. >>

    Anything not having to do with Excel and its object model - .NET is usually a good place to be. The .NET Framework Namespaces cover a large amount of territory and execution is quick.

    The less than optimal side of the equation is that anything you want to manipulate within Excel, itself, will be slower than using "native" VBA code. Out-of-process control has always been slower than in-process, in addition, code has to go through the .NET/COM interface "translation".

    Before you go dropping controls on Worksheets, I should warn you that WinForms (or WPF) controls will only work properly at 100% zoom. Anything else, and they become inactive. They're fine in an ActionsPane. Or on a Ribbon.

    <<I am assuimng that automation is actually all I want to do, although I may be unfamiliar with the nuiances of that words usage in this context>>

    Automation (the .NET people often use the term Interop) means steering the Office application "from outside". VSTO doesn't fall under the "automation" category, as the solution is bound into the Office application (although it's not really "in-process" in the way VBA is). From your description, I'd say you do want VSTO, not "just" automation :-)

    I hope this helps clear up some points? (And sorry for causing the confusion!)


    Cindy Meister, VSTO/Word MVP
    Wednesday, September 15, 2010 4:33 PM
    Moderator

All replies

  • Hi Gabriel

    << I am using Windows 7, Visual Studio 2005 Standard and Office 2007 (Home and Student).>>

    The problem is that Visual Studio Standard does not contain or support Visual Studio Tools for Office. Only VS 2005 Professional (or higher) provides support for VSTO.

    In addition, in VS 2005 VSTO was a separate package you had to purchase in order to get the document and workbook templates for document-level customizations. Or you had to have VS 2005 Team Suite. For VS 2005 only the free VSTO 2005 SE download was available, giving you templates to create VSTO Add-ins. But this does not install in editions below VS 2005 Professional.

    My recommendation would be you upgrade to Visual Studio Professional 2010 if you want to create VSTO projects for Office 2007.


    Cindy Meister, VSTO/Word MVP
    Monday, September 13, 2010 3:00 PM
    Moderator
  • Hello

    Thankyou for your response. I actually just figured that out last night.

    In additition I was only installing the runtime, and ommitting the tools themselves. When I rectified this I got a helpful message similar in vein to your response.

    I intend to purchase VS 2010 at the end of year as it is for my own hobbyist development projects, and therefor cost is an issue. I had been following the upgrade path, from VS 2002, to VS 2005. This time I will purchase the full version as it was very difficult to install VS 2005 SE Upgrade on Windows 7 64 Bit as the previous version would not install.

    Thankfully Microsoft only checks for the existence of a previous installation (as far as upgrading goes) and so I was able to install VS 2002 on an old machine and then just copy the VS directory tree across prior to installing the VS 2005 SE Upgrade.

    I can see that further upgrading will only cause more potential problems in the future, so I pretty much have to buy a full version. I am not sure why Microsoft doesn't just allow the entering in of a previous version CD-Key to verify eligibility ?

    So long story short, I will be following your advice and upgrading as soon as I am able to afford the price, which will probably be later this year. Until then my Office Development will be restricted to Excel Visual Basic.

    Thanks again for your helpful reply, apologies for the long response.

    Regards

     

     

     

    Tuesday, September 14, 2010 5:56 AM
  • Hi Gabriel

    <<Until then my Office Development will be restricted to Excel Visual Basic.>>

    Just for clarification: You can automate an Office application from any version / edition of Visual Studio, even Express. For example, you can create a Windows Form project, set references to the Office and Excel type libraries, then automate the application. (If you're familiar with classic VB6, this would be analagous to creating a VB6 form to automate Excel.)

    What's also available to you is the "Shared Add-in" template for creating a COM add-in.


    Cindy Meister, VSTO/Word MVP
    Tuesday, September 14, 2010 6:11 AM
    Moderator
  • Thankyou for your reply.

    I might have been getting a little confused previously.

    Office development has been a recent hobby I picked up with the sole aim of extending the functionality of an existing Excel Workbook. (My past experience is C++ (and a little C#) although primarily professionaly deployed in the Linux environment all of my personal projects have been targeted at Win32 and sometimes .NET).

    I decied that I preferred to use th IDE (plus MSDN) in Visual Studio 2005 than that provided in Excel, in addittion I assumed there would be greater functionality and better help.

    I am assuimng that automation is actually all I want to do, although I may be unfamiliar with the nuiances of that words usage in this context being that I am an absolute novice Office developer

    I just want to be able to perform some more sophisticated data validation then Excel natively allows, provide some more funtionaly visual input devices (ie drop down boxes etc) then straight Excel (without VB) allows, and automatically generate some content (ranges in particular) as data may be added from time to time. The spreadsheet in question serves as both a reference, like a mini-database, and a calculation device. I would also like to use the Visual Studio IDE, as the editor in VB's constant whining about an error every time you shift the cursor out of an incomplete statement is driving me around the bend.

    Initially I was just using straight Excel. Then when I got tired of creating overly long and obtuse functions to work around Excels formula limitations, I jumped into VB Excel (not sure if that is the right terminology).

    I noticed almost immediately that certain internet examples did not work and threw compiler errors, leading me to discover that I had confused VB Excel with VB .NET. Thats when I jumped into Visual Studio and tried get things working from there.

    Anyhow, I have just downloaded the Express edtion of Visual Studio 2010. If you do not mind could you answer these follow up questions :

    1. Is there a VSTO for VS 2010 Express ? (Or only for the commercial versions. If so what is the minimum version of VS 2010 that needs to be purchased to allow whatever the 2010 equivalent of VSTO is)

    2. Based on what I have provided will using your previous suggestion enable me to fullfil my requirements (data validation, automatic range (et al) generation, some extra visual input elements) or do I need something akin to VSTO for 2010 ?

    Apologies if these questions are more basic then what this forum normaly accepts, I am afraid I am an ignorent  novice in this type of development.

    Regards and Thanks for your previous assistance.

     

     

     

    Wednesday, September 15, 2010 3:51 PM
  • <<I would also like to use the Visual Studio IDE, as the editor in VB's constant whining about an error every time you shift the cursor out of an incomplete statement is driving me around the bend.>>

    <ROFL>I so sympathize. I can help you with that, at least: Tools/Options/Editor. Deactivate AutoSyntaxCheck.

    <<VB Excel (not sure if that is the right terminology).>>

    Excel VBA is the more common usage :-)

    <<1. Is there a VSTO for VS 2010 Express ? (Or only for the commercial versions. If so what is the minimum version of VS 2010 that needs to be purchased to allow whatever the 2010 equivalent of VSTO is)>>

    VS 2010 Professional is the minimum edition that contains VSTO. It supports projects for Office 2007 and 2010 (but not for creating solutions for Office 2003).

    <<2. Based on what I have provided will using your previous suggestion enable me to fullfil my requirements (data validation, automatic range (et al) generation, some extra visual input elements) or do I need something akin to VSTO for 2010 ?>>

    Mmm. VSTO doesn't do anything a really top-flight developer with in-depth COM and Office knowledge couldn't do. But it certainly makes it loads easier as it takes care of all the "plumbing". Rolling your own probably wouldn't be as difficult as re-creating Excel from the ground up, but you get my drift :-)

    <<in addittion I assumed there would be greater functionality and better help.>>

    Better help, no, definitely not. The VBA help (especially in older versions) is still more thorough than any Help files in ".NET speak". And your best resource for anything "How to" related to Excel itself or its object model will be an Excel-specific forum. (There's an Excel Developer forum on MSDN and various end-user targeted forums on the "Answers" site:http://social.answers.microsoft.com/Forums/en-US/group/Office) What they're generally not so good at is giving you .NET code, but since you "speak" VBA you should be able to communicate with them OK. There are a number of us "roaming" that can help with "translation", should it be necessary.

    for questions having to do with VSTO, specifically, this is certainly the right place to ask, which brings us to...

    <<I just want to be able to perform some more sophisticated data validation then Excel natively allows, provide some more funtionaly visual input devices (ie drop down boxes etc) then straight Excel (without VB) allows, and automatically generate some content (ranges in particular) as data may be added from time to time. The spreadsheet in question serves as both a reference, like a mini-database, and a calculation device. >>

    Anything not having to do with Excel and its object model - .NET is usually a good place to be. The .NET Framework Namespaces cover a large amount of territory and execution is quick.

    The less than optimal side of the equation is that anything you want to manipulate within Excel, itself, will be slower than using "native" VBA code. Out-of-process control has always been slower than in-process, in addition, code has to go through the .NET/COM interface "translation".

    Before you go dropping controls on Worksheets, I should warn you that WinForms (or WPF) controls will only work properly at 100% zoom. Anything else, and they become inactive. They're fine in an ActionsPane. Or on a Ribbon.

    <<I am assuimng that automation is actually all I want to do, although I may be unfamiliar with the nuiances of that words usage in this context>>

    Automation (the .NET people often use the term Interop) means steering the Office application "from outside". VSTO doesn't fall under the "automation" category, as the solution is bound into the Office application (although it's not really "in-process" in the way VBA is). From your description, I'd say you do want VSTO, not "just" automation :-)

    I hope this helps clear up some points? (And sorry for causing the confusion!)


    Cindy Meister, VSTO/Word MVP
    Wednesday, September 15, 2010 4:33 PM
    Moderator