OfficeIMO

API Reference

Class

WordHyperLink

Namespace OfficeIMO.Word
Assembly OfficeIMO.Word

Represents a hyperlink element within a Word document. Provides helper methods for modifying hyperlink text, formatting, and target information.

Inheritance

Constructors

Methods

AddHyperLink 4 overloads
public WordHyperLink InsertFormattedHyperlinkAfter(String newText, Uri newUri) #
Returns: WordHyperLink

Inserts a hyperlink after this hyperlink and copies this link's formatting.

Parameters

newText System.String requiredposition: 0
Text for the new hyperlink.
newUri System.Uri requiredposition: 1
Destination of the new hyperlink.

Returns

The inserted hyperlink.

public WordHyperLink InsertFormattedHyperlinkBefore(String newText, Uri newUri) #
Returns: WordHyperLink

Inserts a hyperlink before this hyperlink and copies this link's formatting.

Parameters

newText System.String requiredposition: 0
Text for the new hyperlink.
newUri System.Uri requiredposition: 1
Destination of the new hyperlink.

Returns

The inserted hyperlink.

public Void Remove(Boolean includingParagraph = true) #
Returns: Void

Removes hyperlink. When specified to remove paragraph it will only do so, if paragraph is empty or contains only paragraph properties.

Parameters

includingParagraph System.Boolean = true optionalposition: 0

Properties

public Uri Uri { get; set; } #

Gets or sets the URI of the hyperlink.

public String Id { get; set; } #

Specifies a location in the target of the hyperlink, in the case in which the link is an external link.

public Boolean IsEmail { get; } #

Indicates whether the hyperlink uses the mailto scheme.

public String EmailAddress { get; } #

Gets the email address if the hyperlink is a mailto link.

public Boolean History { get; set; } #

Gets or sets whether the hyperlink is marked as visited.

public String DocLocation { get; set; } #

Specifies a location in the target of the hyperlink, in the case in which the link is an external link.

public String Anchor { get; set; } #

Specifies the name of a bookmark within the document. See Bookmark. If the attribute is omitted, then the default behavior is to navigate to the start of the document. If the r:id attribute is specified, then the anchor attribute is ignored.

public String Tooltip { get; set; } #

Gets or sets the tooltip displayed when hovering over the hyperlink.

public Nullable<TargetFrame> TargetFrame { get; set; } #

Gets or sets the target frame for the hyperlink.

public Boolean IsHttp { get; } #

Gets a value indicating whether the hyperlink uses the HTTP or HTTPS scheme.

public String Scheme { get; } #

Gets the scheme component of the hyperlink URI.

public String Text { get; set; } #

Gets or sets the display text for the hyperlink.