Hi,
I am working on the Word automation and every time i am opening and
closing word document. if there is any Corrupted document its opening a
dialog box saying that this document is corrupt anad want to repiar?
is there any way to force dont show the dialog box and just repair the
document with out promting the dilaog box. I already the OpenandRepair
paramete as True but still it poping the dialogbox
this is how i am passing parameters
objDoc = wordApp.Documents.Open(ref Source, ref missing, ref missing, ref
falseObject, ref missing,
ref missing, ref trueObject, ref missing, ref
missing, ref missing, ref missing,
ref falseObject, ref trueObject, ref missing, ref
missing, ref missing);
Any help would be appriciated.
Thanks
Vijay
Pranav Vaidya - 20 Jun 2007 16:12 GMT
Hi Vijay,
There are couple of ways in which you can achieve this.
You can remove the autorevover files option from Tools-Options
Remove Allow Background Saves.
Otherways is little longer.
Remember, everytime a Word file is closed abnormally, word automatically
creates a temp file for that document. such a file is usually stored along
with the original document. Such file name starts with '~'. You can delete
all such file entries before you open any document which will not show the
File-repair window.
However, doing so involves risk of data loss.
Hopet his helps.
Pranav Vaidya
> Hi,
>
[quoted text clipped - 19 lines]
> Thanks
> Vijay
VIJAY KUMAR - 20 Jun 2007 16:43 GMT
Hi Vaidya,
Thank you very much for your quick response. I can' go for the first
option, because we can not say to end users to turn off that feature. Second
option is not a good idea but it works.
Thanks
Vijay
> Hi Vijay,
>
[quoted text clipped - 39 lines]
> > Thanks
> > Vijay
George Lee - 21 Sep 2007 20:30 GMT
Those options aren't bad but they're not applicable in my scenario. In part,
we get files from many users and different sites, so I can't always see the
temp file.
Is there a way to tell if the file has these errors and then just save the
document? Can the dialog be suppressed.
> Hi Vijay,
>
[quoted text clipped - 39 lines]
> > Thanks
> > Vijay