如何在C#中读取/获取Word文档(原始文档和最终文档!)的文本?

如何在C#中读取/获取Word文档(原始文档和最终文档!)的文本?,c#,visual-studio,ms-word,office-interop,C#,Visual Studio,Ms Word,Office Interop,我想提取具有两个不同版本的Word文档的文本。您可以在Word中切换/显示不同的版本: 顶部栏菜单->审核->跟踪->原始/最终 我按如下方式打开我的文件: private static Microsoft.Office.Interop.Word.ApplicationClass WordApplication; WordApplication = new Microsoft.Office.Interop.Word.ApplicationClass(); private Microsoft.Of

我想提取具有两个不同版本的Word文档的文本。您可以在Word中切换/显示不同的版本:

顶部栏菜单->审核->跟踪->原始/最终

我按如下方式打开我的文件:

private static Microsoft.Office.Interop.Word.ApplicationClass WordApplication;
WordApplication = new Microsoft.Office.Interop.Word.ApplicationClass();
private Microsoft.Office.Interop.Word.Document openDocument:
openDocument = WordApplication.Documents.Open(..);
然后我只需获取段落并提取文本:

foreach (Microsoft.Office.Interop.Word.Paragraph par in openDocument.Content.Paragraphs)
{
 ...
 ...= par.Range.Text
 ...
}
我如何告诉我的程序它应该得到“最终”或“原始”版本? 因为如果我这样做,一次我得到最终版本,另一次(在另一台电脑上)我得到原始版本。。我肯定对两台电脑使用相同的Word文件。

设置属性:

wordDocument.TrackRevisions = true;