C# Programming
05-07-2009, 11:32 AM
Hi,
I'm doing some Microsoft Word automation using Microsoft.Office.Interop.Word namespace,
in this application i'm opening a file (template.docx) and making some changes in it and then saving it.
Just when the file is going to be opened:
myWordDoc = myWordApp.Documents.Add(ref filename, ref missing, ref missing, ref missing);
i receive this exception:
Word was unable to read this document. It may be corrupt.
Try one or more of the following:
* Open and Repair the file.
* Open the file with the Text Recovery converter.
but i'm sure the file is not corrupt, i can open it in word and its data is correct.
Whould anyone please tell me what should i do now???
Thanks in Advance
Roshanak
I'm doing some Microsoft Word automation using Microsoft.Office.Interop.Word namespace,
in this application i'm opening a file (template.docx) and making some changes in it and then saving it.
Just when the file is going to be opened:
myWordDoc = myWordApp.Documents.Add(ref filename, ref missing, ref missing, ref missing);
i receive this exception:
Word was unable to read this document. It may be corrupt.
Try one or more of the following:
* Open and Repair the file.
* Open the file with the Text Recovery converter.
but i'm sure the file is not corrupt, i can open it in word and its data is correct.
Whould anyone please tell me what should i do now???
Thanks in Advance
Roshanak