In my application, am using Microsoft.Office.Interop.Word, for writing contents to a word document.
var wordApplication = new Word.Application { Visible = true };
var document = wordApplication.Documents.Add();
document.Activate();
In every 1 minutes, i will write few lines to the document in a new section.
i.e, a new section will be added in word document at starting of every 5 minute and move cursor to that section, then write content.
document.Sections.Add();
wordApplication.ActiveWindow.Selection.GoTo(Word.WdGoToItem.wdGoToPage, Word.WdGoToDirection.wdGoToLast);
After every 10 minutes, I need to run a Thread in Background and copy contents available in each sections to different text files in a remote location.
My problem is, i am not able to access individual sections.
Suggest a method to copy text in each section to separate variable or in an array.