startLocation = oDoc.Tables[i].Range.End;
endLocation = oDoc.Tables[i + 1].Range.Start; rng = oDoc.Range(ref startLocation, ref endLocation);
rng.Select(); rng.Find.ClearFormatting(); if (rng.Find.Execute(ref findText, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing))
{
MessageBox.Show("Text found.");
}
else
{
MessageBox.Show("Text not found.");
}
运行到rng.Find.Execute的时候有以下错误,是怎么回事呢。
rng的选择区域在打开的WORD中显示也是正确的。
占位程序接收到错误数据。 (异常来自 HRESULT:0x800706F7)
检查异常的ErrorCode属性以确定COM对象返回的HRESULT。
endLocation = oDoc.Tables[i + 1].Range.Start; rng = oDoc.Range(ref startLocation, ref endLocation);
rng.Select(); rng.Find.ClearFormatting(); if (rng.Find.Execute(ref findText, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing))
{
MessageBox.Show("Text found.");
}
else
{
MessageBox.Show("Text not found.");
}
运行到rng.Find.Execute的时候有以下错误,是怎么回事呢。
rng的选择区域在打开的WORD中显示也是正确的。
占位程序接收到错误数据。 (异常来自 HRESULT:0x800706F7)
检查异常的ErrorCode属性以确定COM对象返回的HRESULT。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货