Share via


Step 2: Setting Up the C# Project (C# Tutorial) [Office 2003 SDK Documentation]

Previous   Step 1: Setting Up the SimpleSample Document

Use the following steps to set up your SimpleSample smart document project in Microsoft Visual Studio .NET:

  1. Start Visual Studio and create a new C# Class Library.

  2. In the New Project dialog box, type SimpleSampleCS into the Name box.

  3. Rename the default module clsActions. This is the module in which you will insert the code for your smart document.

    How?

    • In the Solution Explorer, click the default class module, Class1.cs.
    • In the Properties window, change the File Name property to clsActions, as shown in the following image.
    • Press ENTER. The Solution Explorer displays the new project name, as shown in the following image.
  4. Change Class1 in the code to clsActions.

    How?

    • Locate the code line that reads:
      Public Class Class1
    • Change it to read:
      Public Class clsActions
  5. Delete the default constructor code

    How?

    public Class1()
    {
       //
       // TODO: Add constructor logic here
       //
    }
    
  6. Add a reference to the Microsoft Smart Tag 2.0 Type Library.

    How?

    • On the Project menu, click Add Reference.
    • In the Add Reference dialog box, click the COM tab.
    • Scroll in the list of components to Microsoft Smart Tag 2.0 Type Library, and then click Select to add it to the Selected Components list, as shown below.
    • Click OK.

Next  Step 3: Creating the Smart Document DLL