Assigns a hyperlink to the specified character block of the shape's text.
Applies to: Shape object
object.SetCharHyperlink ( iFrom, iTo, hyperlinkID ) |
The SetCharHyperlink method syntax has these parts:
Part | Description |
object | Required. An expression that returns a Shape object. |
iFrom | Required. An expression that returns a Long value. The index of the first character in the character block. |
iTo | Required. An expression that returns a Long value. The index of the last character in the character block. |
hyperlinkID | Required. An expression that returns a Long value. The ID (ID property) of the hyperlink to be assigned to the specified character block. |
Note, that if the character block doesn't include the character block within the iFrom to iTo range, the SetCharHyperlink method adds a new character block and assigns the specified hyperlink to it.
If there is no hyperlink with the hyperlinkID ID in the hyperlink collection of the document which owns the object shape, the SetCharHyperlink neither adds a new character block, nor assigns a hyperlink to an existing one.