Table of Contents

Method RemoveHyperlink

Namespace
DocWright.Dom.Editing
Assembly
DocWright.Dom.dll

Removes a hyperlink, keeping its text: the markers go and the Hyperlink style comes off its runs.

public static DocumentEdit RemoveHyperlink(this WordDocument document, HyperlinkStart link)

Parameters

document WordDocument

The document that holds the link.

link HyperlinkStart

The link's start marker.

Returns

DocumentEdit

The edit; Before and After are the ends of the text the link held.

Exceptions

ArgumentNullException

document or link is null.

ArgumentException

The link is not in a paragraph of document.

InvalidOperationException

The link is in a shape's text box.