I have problems in word automation
C#
1
Posts
1
Posters
0
Views
1
Watching
-
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