Export (0) Print
Expand All

How to: Create Visual Studio Tools for Office Projects

You can use Visual Studio Tools for Office to create different types of projects that are based on Microsoft Office 2003 and the 2007 Microsoft Office system. This topic provides instructions for the following tasks:

  • Creating application-level projects by using Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System (VSTO 2005 SE).

  • Creating document-level projects by using Microsoft Visual Studio 2005 Tools for the Microsoft Office System (VSTO 2005).

  • Creating application-level projects for Microsoft Office Outlook 2003 by using VSTO 2005.

For more information about VSTO 2005 and VSTO 2005 SE, see Office Solutions Development Overview. For more information about document-level projects and application-level projects, see Visual Studio Tools for Office Project Templates Overview.

NoteNote

If you plan to deploy the solution for use offline, you must give the project a name using characters that fit the HTTP protocol specifications. For more information, see Offline Model for Office Solutions.

NoteNote

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

To create an application-level project by using VSTO 2005 SE

  1. On the File menu, point to New, and then click Project. If your IDE is set to use Visual Basic development settings, open the File menu and then click New Project.

    The New Project dialog box appears.

  2. Expand Office in the Project Types pane, under the language you want to use.

  3. Select 2003 Add-ins or 2007 Add-ins under Office in the Project Types pane, depending on which version of Microsoft Office you want to the add-in to work with.

  4. In the Templates pane, select an add-in project.

  5. In the Name box, type a name for the project. By default, this name is also used for the solution.

    NoteNote

    Do not use Unicode characters in the project name if you want to use the default Setup project for add-ins to deploy your add-in. Visual Studio Tools for Office projects support using Unicode characters in the project name, but Setup projects do not. By default, the name of the Setup project for add-ins includes the name of the add-in project.

  6. In the Location box, enter a location where you want to create the project. You can use absolute and UNC paths. Do not use HTTP, FTP, or other protocol paths to the project.

    Locations have the following formats:

    • [drive]:\

    • \\<Server>\<Share>

    Do not use these characters in the location:

    • Asterisk (*)

    • Vertical bar (|)

    • Colon (:) (except following the drive letter)

    • Double quotation mark (") (paths that contain spaces do not need quotation marks)

    • Less than (<)

    • Greater than (>)

    • Question mark (?)

    • Percent sign (%)

  7. Click OK.

    The solution you create contains an add-in project and a Setup project.

    NoteNote

    Add-in projects are always saved when they are created. They cannot be created as temporary projects because a solution can contain only one temporary project. Add-in solutions contain two projects: the add-in project and the Setup project. For more information about temporary projects, see Temporary Projects.

To create a document-level project by using VSTO 2005

  1. On the File menu, point to New, and then click Project. If your IDE is set to use Visual Basic development settings, open the File menu and then click New Project.

    The New Project dialog box appears.

  2. Select Office in the Project Types pane, under the language you want to use.

  3. In the Templates pane, select the document-level project you want to create.

  4. In the Name box, enter a name for the project. By default, this name is also used for the document. If your IDE is set to use Visual C# development settings or General development settings, enter a location and solution name also.

    NoteNote

    You cannot use surrogate characters in the path to the project location or in the project name. For information about surrogate characters, see Unicode Support for Surrogate Pairs and Combining Character Sequences.

  5. Click OK.

    The Visual Studio Tools for Office Project Wizard opens.

  6. Select whether you want to create a new document or copy an existing one.

  7. If you are creating a new document, specify the name or accept the default.

    If you are using an existing document, specify the location of the document.

    You can use absolute and UNC paths. Do not use HTTP, FTP, or other protocol paths to the document.

    Locations have the following formats:

    • [drive]:\

    • \\<Server>\<Share>

    Do not use these characters in the location:

    • Asterisk (*)

    • Vertical bar (|)

    • Colon (:) (except following the drive letter)

    • Double quotation mark (") (paths that contain spaces do not need quotation marks)

    • Less than (<)

    • Greater than (>)

    • Question mark (?)

    • Percent sign (%)

  8. Click Finish.

To create an Outlook add-in project by using VSTO 2005

  1. On the File menu, point to New, and then click Project. If your IDE is set to use Visual Basic development settings, open the File menu and then click New Project.

    The New Project dialog box appears.

  2. Select Office in the Project Types pane, under the language you want to use.

  3. In the Templates pane, select the Outlook Add-in project.

  4. In the Name box, type a name for the project. By default, this name is also used for the solution.

    NoteNote

    Do not use Unicode characters in the project name if you want to use the default Setup project for Outlook add-ins to deploy your add-in. Visual Studio Tools for Office projects support using Unicode characters in the project name, but Setup projects do not. By default, the name of the Setup project for Outlook add-ins includes the name of the Outlook add-in project.

    In the Location box, enter a location where you want to create the project. You can use absolute and UNC paths. Do not use HTTP, FTP, or other protocol paths to the project.

    Locations have the following formats:

    • [drive]:\

    • \\<Server>\<Share>

    Do not use these characters in the location:

    • Asterisk (*)

    • Vertical bar (|)

    • Colon (:) (except following the drive letter)

    • Double quotation mark (") (paths that contain spaces do not need quotation marks)

    • Less than (<)

    • Greater than (>)

    • Question mark (?)

    • Percent sign (%)

  5. Click OK.

    The solution you create contains an Outlook project and a Setup project.

    NoteNote

    Outlook projects are always saved when they are created. They cannot be created as temporary projects because a solution can contain only one temporary project. Outlook solutions contain two projects: the Outlook add-in project and the Setup project. For more information about temporary projects, see Temporary Projects.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft