When opened, the template raises the New event. When opened, the document raises the Open event. They cannot modify the original unless they are given special permissions. Users can open a template to create a local copy as a new document. Any saved changes are kept in the original. Users can open and modify a document, unless it is set to be read-only. ![]() ![]() The following table outlines the differences between documents and templates. In this case, create your solution by using an Excel or Word template project. In other situations you might want to make a template available on a server, so that each user can open the template and save a local copy as a document. In this case, create your solution by using an Excel or Word document project. In some situations, you might want to give a copy of a document to each user. ![]() For more information, see Features available by Office application and project type. When you design a solution around a Word document or Excel workbook, you must decide the best way to make that document available to your users.Īpplies to: The information in this topic applies to document-level projects for Excel and Word. Walkthrough: Create your first VSTO Add-in for Word Walkthrough: Create your first VSTO Add-in for Project Walkthrough: Create your first VSTO Add-in for PowerPoint Walkthrough: Create your first VSTO Add-in for Outlook Walkthrough: Create your first VSTO Add-in for Excel Unlike document-level projects, your code is not associated with a single document.įor more information about getting started with these project types, see the following topics: When you create a project that is based on one of these project templates, the code in your solution runs when the associated application is open. The Office/SharePoint node in the New Project dialog box provides the following project templates to get you started creating VSTO Add-ins. Walkthrough: Create your first document-level customization for Excel Walkthrough: Create your first document-level customization for Word For more information, see Limitations of global templates and Excel Add-ins (.xla files).įor information about getting started with these project types, see the following topics: The assembly is not called if the template is loaded from the Startup directory of Word. Word templates that reference managed code extensions cannot be used as global VSTO Add-ins. The features in your solution are available from the new document that the user creates from the template. However, the Word Template and Excel Template project templates makes it easy for users to create new local document or workbook copies of the customized template in your solution. The Word Template and Excel Template project templates behave identically to the Word Document and Excel Workbook project templates. In these types of solutions, your code runs only when the associated document is open in Word or Excel. The Word Document and Excel Workbook project templates provide code to get you started creating a solution that is based on a specific document or workbook. The Office node in the New Project dialog box provides the following project templates to get you started creating document-level customizations for Word and Excel: For more information, see Configure a computer to develop Office solutions. The Office development tools are included with certain editions of Visual Studio. For more information, see Office projects in the Visual Studio environment and Events in Office projects. You can add code to these event handlers to initialize your solution when it is loaded and to clean up your solution when it is unloaded. The generated code for each project includes startup and shutdown event handlers. Each template generates a project with the appropriate configuration for the target application, including assembly references and debugging settings.Įach project provides files and code to get you started on a specific kind of solution. ![]() The Office project templates are available in the New Project dialog box, under the Office node of the Visual C# and Visual Basic language nodes. The Microsoft Office developer tools in Visual Studio include project templates for creating the following types of Office solutions:įor a detailed comparison of these types of Office solutions, see Office solutions development overview (VSTO). Applies to: Visual Studio Visual Studio for Mac Visual Studio Code
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |