i'm able to read the content from word file which is corrupted and recovery it but im stuck how to copy the content to create a new word file and copy that content to it
here is the bel;ow code to read the content , but please help me to create a new word and copy contetnt without loosing the exact formats of content.
Microsoft.Office.Interop.Word.ApplicationClass wordApp = new ApplicationClass();
object file = path;
object nullobj = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.Document doc = wordApp.Documents.Open(
ref file, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,true);
doc.ActiveWindow.Selection.WholeStory();
IDataObject data = Clipboard.GetDataObject();
txtFileContent.Text = data.GetData(DataFormats.Text).ToString();
doc.Close(ref nullobj, ref nullobj, ref nullobj);
wordApp.Quit(ref nullobj, ref nullobj, ref nullobj);