This "facade" class makes it easier to work with a hyperlink field in a Word document. A hyperlink is represented by a HYPERLINK field in a Word document. A field in Aspose.Words consists of several nodes and it might be difficult to work with all those nodes directly. Note this is a simple implementation and will work only if the hyperlink code and name each consist of one Run only. [FieldStart][Run - field code][FieldSeparator][Run - field result][FieldEnd] The field code contains a string in one of these formats: HYPERLINK "url" HYPERLINK \l "bookmark name" The field result contains text that is displayed to the user.
        [Test] //ExSkip
        public void ReplaceHyperlinks()
        {
            // Specify your document name here.
            Document doc = new Document(MyDir + "ReplaceHyperlinks.doc");

            // Hyperlinks in a Word documents are fields, select all field start nodes so we can find the hyperlinks.
            NodeList fieldStarts = doc.SelectNodes("//FieldStart");
            foreach (FieldStart fieldStart in fieldStarts)
            {
                if (fieldStart.FieldType.Equals(FieldType.FieldHyperlink))
                {
                    // The field is a hyperlink field, use the "facade" class to help to deal with the field.
                    Hyperlink hyperlink = new Hyperlink(fieldStart);

                    // Some hyperlinks can be local (links to bookmarks inside the document), ignore these.
                    if (hyperlink.IsLocal)
                        continue;

                    // The Hyperlink class allows to set the target URL and the display name 
                    // of the link easily by setting the properties.
                    hyperlink.Target = NewUrl;
                    hyperlink.Name = NewName;
                }
            }

            doc.Save(MyDir + @"\Artifacts\ReplaceHyperlinks.doc");
        }