using System;
using Docs.Word;


namespace SampleManager
{
	class Textruns_Hyperlinks
	{
		internal static Document Main1()
		{
			//	Open the document with given name and gets the first paragraph
			Document Doc = Document.ReadDOC(Form1.SourceFolder + "Textruns - Hyperlinks.doc");
			Paragraph Par1 = (Paragraph)Doc.Sections[0].Nodes[0];

			//	Make two hyperlinks
			Par1.GetTextrun(31, 27).AddHyperlink(LinkType.ExternalFile, "1.doc");
			Par1.GetTextrun(130, 10).AddHyperlink(LinkType.WebPage, "http://en.wikipedia.org/wiki/Mars");

			return Doc;
		}
	}
}
