![]() ![]() ![]() The new code uses the object model of Word to add a second paragraph of text to the document. Next, add code to the ThisDocument code file. This text was added by using the designer.Īdd text to the document programmatically In the document that is open in the designer, type the following text. ![]() To add text to your document by using the designer For more information about how to use the designer, see Office projects in the Visual Studio environment. For example, you can add text, tables, or Word controls. You can design the user interface (UI) of your customization by modifying the document that is open in the designer. In Solution Explorer, double-click the ThisDocument code file. In Solution Explorer, right-click the ThisDocument code file, and click View Designer. To close and reopen the document in the designerĬlose the document by clicking the Close button (X) for the designer window. If you deliberately or accidentally close the document in the designer while you are developing your project, you can reopen it. The FirstDocumentCustomization document is opened automatically in the designer.Ĭlose and reopen the document in the designer Visual Studio creates the FirstDocumentCustomization project, and adds the FirstDocumentCustomization document and ThisDocument code file to the project.Select Create a new document from the Visual Studio Tools for Office Project Wizard, and click OK. Type FirstWorkbookCustomization in the Name box on the Configure your new project dialog and click Create. For more information see Create a new project in Visual Studio. You can also filter the list of templates to show only the templates for Office by selecting Office in the Project type dropdown box. For example, typing Excel will show you all of the project templates for Excel. You can also search for templates by typing the name of the Office product in the Search text box at the top of the Create a New Project dialog. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |