您能否让我知道如何使用 c# 从 ms-word 文档书签中动态检索数据。有关此的在线信息没有用..我尝试了以下代码:
private void btnBookmark_Click(object sender, EventArgs e)
{
object missing = Type.Missing;
try
{
string wordOutputPath="D:\\RC Docs\\Template\\WordDocumentName";
objWordDoc = objWord.Documents.Open(wordOutputPath.ToString(), false, false, ref missing,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, true,
ref missing, ref missing, ref missing, ref missing);
//how to retrieve the bookmarks from the document-code has to be written here
objWordDoc.Close();
}