Step 1 of 3: Setting up the Application
In This Topic
You begin with creating a WPF application in Visual Studio, adding Word reference and a button control to your application using the following steps:
- Create a new WPF project in Visual Studio.
- Add the C1Word reference (dll) to your application.
- Add the following namespaces in the code view:
imports C1.WPF.Word
imports Microsoft.Win32
using C1.WPF.Word;
using Microsoft.Win32;
- Switch to design view and add a Button control to the Form in your application to start using the C1Word. Set the Content property to a suitable text such as, Text, Name property to btnText and the Click event to btnText_Click.
- Double-click the btnText_Click event from the properties window.
The btnText_Click event gets created in the code view.