Creates a new hyperlink text block to be inserted to the current paragraph or table.
Name | Type | Description |
sLink | string | The hyperlink address. |
sDisplay | string | The text to display the hyperlink. |
sScreenTipText | string | The screen tip text. |
builder.CreateFile("docx"); var oDocument = Api.GetDocument(); var oHyperlink = Api.CreateHyperlink("https://api.onlyoffice.com/", "ONLYOFFICE Document Builder", "ONLYOFFICE for developers"); var sType = oHyperlink.GetClassType(); var oParagraph = oDocument.GetElement(0); oParagraph.AddElement(oHyperlink, 0); oParagraph.AddLineBreak(); oParagraph.AddText("Class type of the created object: " + sType); builder.SaveFile("docx", "CreateHyperlink.docx"); builder.CloseFile();