Removing the VBA Code and the User Form from the Template

1. Open the template in Word by clicking Open on the File menu. Then press ALT+F11 to open the VBA Code Editor.

2. In the Forms folder, delete the frmMain form.

3. In the Microsoft Word Objects folder, open the ThisDocument code. Delete all the code by selecting the code with the mouse and pressing the DELETE key.

4. Save the file as Professional Memo

Now that you have removed all the VBA code, you are ready to use the template to create your VSTO project.

1. Create a new VSTO Word project.

2. Start VSTO and create a new Word Template project. Name the new project "Professional Memo VSTO," and then click OK to start the VSTO Project Wizard.

3. Select Copy An Existing Document, and type the path to Professional Memo, as shown in Figure 12.4. Click OK to create the VSTO project.

0 0

Post a comment