How to: Enable Smart Tags in Word and Excel
Applies to |
---|
The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office. Document-level projects
Application-level projects
For more information, see Features Available by Application and Project Type. |
Smart tags must be explicitly enabled in Word or Excel on the end user computer. By default, smart tags are not enabled.
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 procedures are different for Microsoft Office 2003 and the 2007 Microsoft Office system.
To enable smart tags in Word 2003 and Excel 2003
In Word or Excel, on the Tools menu, click AutoCorrect Options.
Click the Smart Tags tab.
Select the Label data with smart tags check box.
To enable smart tags in Word 2007 and Excel 2007
In Word or Excel, click the Microsoft Office Button.
Click the ApplicationName Options button.
In the categories pane, click Add-ins.
In the Manage box, click Smart Tags, and then click Go.
Select the Label data with smart tags check box.
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
How to: Create Smart Tags With Custom Recognizers in Excel
Walkthrough: Creating a Smart Tag by Using a Document-Level Customization
Walkthrough: Creating a Smart Tag by Using an Application-Level Add-In
Concepts
Change History
Date |
History |
Reason |
---|---|---|
July 2008 |
Added topic. |
Customer feedback. |