Udostępnij za pośrednictwem


How to: Deploy Office Solutions (2003 System)

Applies to

The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office.

Project type

  • Document-level projects

  • Application-level projects

Microsoft Office version

  • Microsoft Office 2003

For more information, see Features Available by Application and Project Type.

There are different steps for deploying the two types of projects:

  • Document-level customizations

  • Application-level add-ins

Each type of solution can be deployed in several ways, depending on the deployment model you are using. For more information about the deployment models for Visual Studio Tools for Office solutions, see Deployment Models (2003 System).

Deploying Document-Level Customizations

To deploy your document-level customizations, you must deploy these components:

  • A Microsoft Office Word 2003 or Microsoft Office Excel 2003 file (template, document, or workbook) that the end user works in.

  • An assembly that contains your compiled custom code, plus any referenced assemblies.

Optionally, to take advantage of automatic assembly updates for the end user, you must also deploy:

  • An application manifest. If you use the Publish Wizard, this file is created for you.

  • A deployment manifest. If you use the Publish Wizard, this file is created for you.

For more information, see Deploying Document-Level Customizations (2003 System). For information about prerequisites for running Office solutions on the end user's computer, see How to: Prepare End User Computers to Run Office Solutions (2003 System).

To deploy the assembly on a network and the document as a local copy

  1. In Visual Studio, use the Publish Wizard to deploy your solution to a server. For more information, see How to: Deploy Solution Files Using the Publish Wizard (2003 System).

    For information about how to publish to a test server and then move the solution to a production server, see How to: Change the Location of Document-Level Customizations (2003 System).

  2. Make changes to security policy so that each end user can run the solution. For more information, see Security Requirements to Run Office Solutions (2003 System).

  3. Distribute copies of the document or workbook to each user.

For a step-by-step example, see Walkthrough: Deploying a Document to a Local Folder and an Assembly to a Network Folder (2003 System).

To deploy local copies of the document and assembly

  1. In Visual Studio, add a Setup project to your solution and configure the options as desired. For more information, see Windows Installer Deployment Tasks.

    The Setup project is used to create a Windows Installer (.msi) file that will install your solution.

  2. If you want to set security policy at the User level, include a custom action in your Setup project that uses the Code Access Security Policy tool (Caspol.exe) to grant permissions to the assemblies for the current user. For more information, see Security Requirements to Run Office Solutions (2003 System) and Code Access Security Policy Tool (Caspol.exe).

  3. Set the custom action to run at the end of the installation process. For more information, see Custom Actions Management in Deployment.

  4. Deploy the Windows Installer file to each end user. If you do not set security policy for the user during installation, you must grant permissions to the assemblies using another method before the solution will run.

For a step-by-step example, see Walkthrough: Deploying a Document and an Assembly to a Local Folder (2003 System).

To deploy the document and assembly on a network

  1. In Visual Studio, use the Publish Wizard to deploy your solution to a server. For more information, see How to: Deploy Solution Files Using the Publish Wizard (2003 System).

    For information about how to publish to a test server and then move the solution to a production server, see How to: Change the Location of Document-Level Customizations (2003 System).

  2. Make changes to security policy so that each end user can run the solution. For more information, see Security Requirements to Run Office Solutions (2003 System).

For a step-by-step example, see Walkthrough: Deploying a Document and an Assembly to a Network Folder (2003 System).

Deploying Application-Level Add-Ins

To deploy your add-in, you must deploy these components:

  • An assembly that contains your compiled add-in code, plus any referenced assemblies.

  • The application manifest for the add-in.

Optionally, to deploy your add-in to a network location to take advantage of automatic assembly updates for the end user, you must also deploy a deployment manifest. If you use the Publish Wizard, this file is created for you.

For more information, see Deploying Application-Level Add-Ins (2003 System). For information about prerequisites for running Microsoft Office solutions on the end user's computer, see How to: Prepare End User Computers to Run Office Solutions (2003 System).

To deploy the add-in assembly on a network

  1. In Visual Studio, use the Publish Wizard to deploy your solution to a server. For more information, see How to: Deploy Solution Files Using the Publish Wizard (2003 System).

    For information about how to publish to a test server and then move the solution to a production server, see How to: Change the Location of Application-Level Add-ins (2003 System).

  2. Make changes to security policy so that each end user can run the solution. For more information, see Security Requirements to Run Office Solutions (2003 System).

  3. Create the required registry entries on each client computer. For more information, see Registry Entries for Application-Level Add-Ins.

  4. Copy the application manifest for the add-in to each client computer. The application manifest must be copied to the location specified by the ManifestLocation value under the following registry key.

    HKEY_CURRENT_USER\Software\Classes\CLSID\{add-in CLSID}\InprocServer32
    

    For more information, see Registry Entries for Application-Level Add-Ins.

To deploy the add-in assembly on each computer

  1. In Visual Studio, configure the options for the Setup project included in your add-in solution. For more information, see Setup Projects for Application-Level Add-ins (2003 System).

  2. Grant full trust to the assemblies in each end user's security policy. If you want to set security policy in the Setup project, add a custom action that uses the Code Access Security Policy tool (Caspol.exe) to grant permissions to the assemblies for the current user. For more information, see Security Requirements to Run Office Solutions (2003 System) and Code Access Security Policy Tool (Caspol.exe).

  3. Set the custom action to run at the end of the installation process. For more information, see Custom Actions Management in Deployment.

  4. Deploy the Windows Installer file to each end user. If you do not set security policy for the user during installation, you must grant permissions to the assemblies by using another method before the solution will run.

See Also

Tasks

How to: Deploy Solution Files Using the Publish Wizard (2003 System)

How to: Deploy Solution Files Manually (2003 System)

How to: Prepare End User Computers to Run Office Solutions (2003 System)

How to: Deploy for Offline Use of Documents (2003 System)

Concepts

Secure Deployment (2003 System)

Assemblies in Office Solutions Overview

Deploying Office Solutions (2003 System)

Deployment Models (2003 System)