How to disable crash dialog

M

Markku Partanen

Hi,
I've done an application running as a scheduled batch job with no user
interaction using Word for mail merge.
The merge is relying on a template file and an Office Database Connection to
create the final documents. Because I'm not in control of either the data or
the word template file there are situations where those doesn't match and in
the worst case Word crashes showing the recover/send report dialog and
waiting for user input.
I would like to have word die in peace with no recover functionality enabled
at all so I can continue with my application and go on to the next merge and
start a new instance om word if the earlier one crashed.
Will I have to find out the crashed word process id and kill it
unconditionally first or is there any other way around this?
/Markku
 
J

Jean-Guy Marcil

Markku Partanen was telling us:
Markku Partanen nous racontait que :
Hi,
I've done an application running as a scheduled batch job with no user
interaction using Word for mail merge.
The merge is relying on a template file and an Office Database
Connection to create the final documents. Because I'm not in control
of either the data or the word template file there are situations
where those doesn't match and in the worst case Word crashes showing
the recover/send report dialog and waiting for user input.
I would like to have word die in peace with no recover functionality
enabled at all so I can continue with my application and go on to the
next merge and start a new instance om word if the earlier one
crashed.
Will I have to find out the crashed word process id and kill it
unconditionally first or is there any other way around this?
/Markku

It would be easier to check if both the template and the database exist
before doing the merge. If one is missing, do not initiate the merge (thus
avoiding crashes...).

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
M

Markku Partanen

Well, database, data and templates exits but they might not be error free
also users are allowed to edit the templates.
I doubth that I'll be able to cover for all possible error situations that
might raise so that's why I'm trying to find a way to make sure my
application doesn't hang.
/Markku
 
J

Jean-Guy Marcil

Markku Partanen was telling us:
Markku Partanen nous racontait que :
Well, database, data and templates exits but they might not be error
free also users are allowed to edit the templates.
I doubth that I'll be able to cover for all possible error situations
that might raise so that's why I'm trying to find a way to make sure
my application doesn't hang.

I do not think you can suppress that dialog.

I would do thorough testing to see what kind of errors can occur and code
accordingly.

Of course, if you open up the template to users, anything can happen... This
is why in cases like this I would not allow the user to edit that template.

I guess you can have generic error trapping that would automatically close
Word as soon as an error is thrown, but it is still possible that some
serious errors generate the Crash dialog and wait for user input before your
error trapping code has a chance to execute...

If this is a serious issue, I would revise the whole project and try to
eliminate the user interaction from the template so as to make sure that no
errors can be generated due to users playing witn the template.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
M

Markku Partanen

Ok, would it be possible to send key strokes through the Word.Application
object to the crash dialog or getting the process id for the process running
Word?
/Markku
 
J

Jean-Guy Marcil

Markku Partanen was telling us:
Markku Partanen nous racontait que :
Ok, would it be possible to send key strokes through the

Never tried that... I believe that if Word is crashed, no code will be able
to run...

That is what I have been trying to say... you have to prevent Word from
crashing in the first place.
Word.Application object to the crash dialog or getting the process id
for the process running Word?

There are some API calls that would do that, but here I do not know how to
do that. Try Google or wait for some one to chime in!

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
M

Markku Partanen

Oki thanks for engaging
/Markku

Jean-Guy Marcil said:
Markku Partanen was telling us:
Markku Partanen nous racontait que :


Never tried that... I believe that if Word is crashed, no code will be able
to run...

That is what I have been trying to say... you have to prevent Word from
crashing in the first place.


There are some API calls that would do that, but here I do not know how to
do that. Try Google or wait for some one to chime in!

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top