Invalid Hyperlink: Malformed URI is embedded as a hyperlink in the document.
程序员文章站
2024-02-12 13:31:46
...
环境:vs2010,office2010
static void Main(string[] args)
{
string strFile = "D:\\error.docx";
try
{
using (WordprocessingDocument sourceDoc = WordprocessingDocument.Open(strFile, true))
{
}
}
catch (Exception ex)
{
int test = 0;
}
}
用openxml打开一word,报错,如题。
原因:文章中有超链接,但超链接不合法