Compartilhar via


Factory.CreateSmartTag(String, String, ISmartTagExtension) Method

Definition

Creates a SmartTag object that represents a smart tag on a worksheet. This type or member is intended to be used only in projects for the 2007 Microsoft Office system. Smart tags are deprecated in Office 2010..

public Microsoft.Office.Tools.Excel.SmartTag CreateSmartTag (string smartTagType, string caption, Microsoft.Office.Tools.Excel.ISmartTagExtension extension = default);
abstract member CreateSmartTag : string * string * Microsoft.Office.Tools.Excel.ISmartTagExtension -> Microsoft.Office.Tools.Excel.SmartTag
Public Function CreateSmartTag (smartTagType As String, caption As String, Optional extension As ISmartTagExtension = Nothing) As SmartTag

Parameters

smartTagType
String

A unique identifier for the smart tag, composed of a namespace URI and a tag type name separated by a number sign (#).

caption
String

The name of the smart tag, which is displayed on the smart tag menu.

extension
ISmartTagExtension

Optional. An extension object that defines a custom recognizer for the smart tag.

Returns

The new smart tag.

Exceptions

smartTagType or caption is either null or empty, or smartTagType is not valid.

Remarks

An example of a valid string for the smartTagType parameter is http://smarttags.contoso.com#TagName. A well-formed smart tag type string does not contain white space, and it starts with a letter (a-z, A-Z), an underscore (_), or a colon (:).

Applies to