I am new to developing for Office Forms Server / MOSS 2007. I have to choose between designing my web-based forms and writing code for them in Visual Studio Tools for Applications (aka VSTA) or Visual Studio Tools for Office (aka VSTO). VSTA is included free as part of the license for InfoPath 2007; VSTO, also free, requires Visual Studio 2005 / 2008. I have licenses for both of the products and cannot easily decide what the pros and cons of each IDE might be.
Which IDE should I use for developing custom code for InfoPath Forms, VSTA or VSTO
infopathms-officevstavsto
Related Solutions
As I understand it, VSTA is not a 'new VBA' nor built into Office 2007, but a separate 'Super-VBA with .NET' that must be licensed from Summit, and distributed as part of an external application. I think it's just targeted at ISVs wishing to extend Office, but the blurb about it also contains this gem:
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.
I've not bothered googling BDMs and SI means le Système International d'Unités to me, but I took this mean that you can take the horrible mess of excel VBA that your traders used to turn worthless morgages into goldmine CDOs (and then bailouts), and your 'real developers' can open it in Visual Studio and sort the mess out (or just quit...).
also VBA and VSTA can exist together: http://blogs.msdn.com/vsta/archive/2006/07/31/684514.aspx
Yeah, it can get confusing, especially given the skip-level naming conventions, etc. Essentially, you'll need:
- Full version (not Express) of Visual Studio and the .NET version you're targetting.
- One of the VSTO run times (VSTO 2003, VSTO 2005, VSTO 2005 SE, VSTO 2008, VSTO 2010). For what your asking, VSTO 2005 SE is probably your best bet.
- When distributing your app, you'll need more, like the PIAs and the .NET version you've targetted. For VSTO 2010, you don't need the PIAs (just what you're using will be packaged with your app automatically).
A couple of tips:
- Going from the VBE inside of Office to VSTO should be a smooth-ish move if you've used .NET to much extent.
- The VSTO versions of the object models for any given program (Excel, PowerPoint, etc.) there may be a few more ways of doing things that are different/better than in the VBA version of the object model. For example, the Bookmark control for Word in VSTO 2008 is not the same as the one that is native to one accessed via VBA.
- Distributing your app can be a pain. This is the very reason that that VSTO for Visual Studio 2010 does not require you to include the full interop (PIA) files with your package.
- Targetting different versions of Office with the same solution is not officially supported for pre-VSTO 2010. There are ways around this issue that some folks have talked about, but you won't get much support from MSFT on it.
There are some sites that you should take a look at:
- Requirements VSTO solutions. This is older, but is helpful to read regarding the differences between the 2005 and 2005 SE versions. This one is also decent in that it includes the 2008 version.
- Online resources for VSTO. This is a good 'jump' site for learning more about VSTO.
- Getting Started (Visual Studio Tools for Office). This, and it's sister link pages, are good jump pages. Not that useful if you're just coming up to speed with VSTO, but good for a little bit later.
- Can you build one add-in for multiple versions of Office?. This is older, but discusses some of the issues around building for multiple versions of Office.
- This site used to be better organized, but I've always found that videos are a very fast way to learn. Most of these videos use one version of VSTO.
Finally, to save the best for last, this is the book I read when I was just starting out and it was very helpful: VSTO for Mere Mortals(TM): A VBA Developer's Guide to Microsoft Office Development Using Visual Studio 2005 Tools for Office
Best Answer
This explains it better than I can: http://blogs.msdn.com/andreww/archive/2006/02/21/536179.aspx
Given the fact that the license for VSTA comes with InfoPath, I'd probably run with that.