Sdílet prostřednictvím


How to: Enable Smart Tags in Word and Excel

Smart tags must be explicitly enabled in Word or Excel on the end user computer. By default, smart tags are not enabled.

Applies to: The information in this topic applies to document-level projects and application-level projects for Excel 2007 and Word 2007. For more information, see Features Available by Office Application and Project Type.

There are two ways to enable smart tags:

  • You can programmatically enable smart tags by running code in your solution.

  • End users can enable smart tags by using menu commands in the UI of Word or Excel.

Enabling Smart Tags by Using Code

The code used to enable smart tags is different for Word and Excel.

To enable smart tags in Word

  • Set the LabelSmartTags property to true.

    The following code example enables smart tags if they are currently disabled. To use this code, run it from the ThisDocument class (for document-level projects) or ThisAddIn class (for application-level projects).

    If Me.Application.Options.LabelSmartTags = False Then
        Me.Application.Options.LabelSmartTags = True
    End If
    
    if (!this.Application.Options.LabelSmartTags)
    {
        this.Application.Options.LabelSmartTags = true;
    }
    

To enable smart tags in Excel

  • Set the Recognize property to true.

    The following code example enables smart tags if they are currently disabled. To use this code, run it from the ThisWorkbook class (for document-level projects) or ThisAddIn class (for application-level projects).

    If Me.Application.SmartTagRecognizers.Recognize = False Then
        Me.Application.SmartTagRecognizers.Recognize = True
    End If
    
    if (!this.Application.SmartTagRecognizers.Recognize)
    {
        this.Application.SmartTagRecognizers.Recognize = true;
    }
    

Enabling Smart Tags by Using the UI

The procedure for enabling smart tags are same in Word and Excel.

To enable smart tags in Word 2007 and Excel 2007

  1. Click the Microsoft Office Button.

  2. Click Options.

  3. In the categories pane, click Add-ins.

  4. In the Manage box, choose Smart Tags and then click Go.

  5. Select the Label data with smart tags check box.

  6. Click OK.

See Also

Tasks

How to: Add Smart Tags to Word Documents

How to: Add Smart Tags to Excel Workbooks

How to: Create Smart Tags With Custom Recognizers in Word and .NET Framework 3.5

How to: Create Smart Tags With Custom Recognizers in Excel and .NET Framework 3.5

Walkthrough: Creating a Smart Tag by Using a Document-Level Customization

Walkthrough: Creating a Smart Tag by Using an Application-Level Add-In

Concepts

Smart Tags Architecture

Other Resources

Smart Tags Overview