Invalid Hyperlink: Malformed URI is embedded as a hyperlink in the document.

环境: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,报错,如题。

原因:文章中有超链接,但超链接不合法

猜你喜欢

转载自blog.csdn.net/dragoo1/article/details/78469499