Hi Everyone,
I have created a Word Application in VSTO (C#). I have a Active word document where i have created lots of modifications like i have created some bookmarks, highlighted some text. Now after that i am creating wordprocessingdocument object by using fileStream
of the same active document. Here is the code:
Stream stream = new FileStream(wdDocument.Path + "//" + wdDocument.Name, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); WordprocessingDocument wpd = WordprocessingDocument.Open(stream, false);
Now here the problem is, because the document is not saved i am not getting the updated contents from the WordProcessingDocument object. Is there any way to get the updated contents from the document without saving?
or is there any other way to load the active document to stream and read the contents from there?
Thanks,
Shahab Abbasi