【发布时间】:2016-03-08 20:34:12
【问题描述】:
如何动态创建带有docx.dll的超链接,目前在下面尝试过,但不起作用
using (DocX document = DocX.Create(@"Test.docx"))
{
// Add a hyperlink to this document.
Hyperlink h = document.AddHyperlink
("Google", new Uri("http://www.google.com"));
// Add a new Paragraph to this document.
Paragraph p = document.InsertParagraph();
p.Append("My favourite search engine is ");
p.AppendHyperlink(h);
p.Append(", I think it's great.");
// Save all changes made to this document.
document.Save();
}
【问题讨论】: