I there a way to see if a file have been converted due to damaged file or wrong format.
What I do is automatically turn documents into tiff, from documents supported by MS word. What I did was I changed a bmp file into a doc file, and Word opened it and send it to print, and it became a 106 paged tiff.
Is there a way to see in word that file have been converted or is there a technique for that.
The code I have now.
Document Doc;
Application word = new Application();
try
{
word.DisplayAlerts = WdAlertLevel.wdAlertsNone;
Doc = word.Documents.Open(LocationAndFile, PasswordDocument: "BSpw", ReadOnly: true);
word.ActivePrinter = "TIFF Image Printer 10.0";
Doc.PrintOut(); //printout untested for now
Doc.Close(false);
}
catch (System.Runtime.InteropServices.COMException ex)
{
word.Quit();
releaseObject(word);
return new ReturnInfo(LocationAndFile, true, ex.ErrorCode);
}
word.Quit();
releaseObject(Doc);
releaseObject(word);
The try catch is for stopping passworded documents, I hoped it would catch broken files but it just attempt to convert em. It does not matter if it prints a page that was converted, but I want to know it so I can list the file afterwards to make sure it looks normal.
According to the Word Object Model page, there is no member to verify whether a document has been repaired.
So, no, this would not be possible.