-2
我正在使用document.Active()
方法,它是Microsoft.office.interop.word
命名空間的一部分。我想打開該文件,即我想查看在Word應用程序中打開的文件。我已將thetrackRevisions
屬性設置爲true和其餘所有的東西。打開MS Word文件
我只是想讓文件打開NOT IN SAVE-AS MODE。只需打開,以便當我從數據庫或從我的PC驅動器打開文檔時,我只想打開它。
這裏是我執行的代碼:
Word.Document tempDoc = app.Documents.Open("E:\\xyz.docx");
// Activate the document so it shows up in front
tempDoc.Activate();
tempDoc.TrackRevisions = true;
foreach (Revision rev in tempDoc.Revisions)
{
string editedBy = rev.Author;
//string what = rev.Cells;
}
tempDoc.Close(ref Nothing, ref format, ref Nothing);
浮現在你的腦海有什麼建議?