More than one way to write code: Visual Studio and InfoPath
If you need to write some Visual Basic or C# code behind your form, or maybe just some script, there are a few different tools you can use depending on which versions of InfoPath and Visual Studio you have.
Here's a quick table summarizing it all:
|
|
InfoPath 2003 |
InfoPath 2007 Beta |
|
No Visual Studio |
|
OR
|
|
VS .NET 2003 |
|
Not supported
(use MSE or VSTA, above) |
|
VS 2005 |
|
|
Note that both Microsoft Script Editor (MSE) and Visual Studio Tools for Applications (VSTA) come with InfoPath 2007 Beta, so you can open them from the Tools | Programming menu. If you don't see the one you want, change the language in Tools | Form Options. If it gives you an error that it's not installed, here's how to install them:
-
If you are going to install VSTA, make sure you have the pre-requisites first:
-
Go to Start > Control Panel > Add or Remove Programs
-
Select your Office installation and click Change
-
In the Office Setup wizard select to add features
-
Find Microsoft Script Editor (under Office Tools) and/or Visual Studio Tools for Applications (under InfoPath > .NET Programmability) and select Run from my computer
-
Finish the wizard
Happy code writing!
- Ned