Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2005

Tip: Looking for answers? Try searching our database.

How to disable crash dialog

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Markku Partanen - 13 Oct 2005 10:22 GMT
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
Jean-Guy Marcil - 13 Oct 2005 23:52 GMT
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
[quoted text clipped - 11 lines]
> 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...).

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

Markku Partanen - 14 Oct 2005 08:42 GMT
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

> Markku Partanen was telling us:
> Markku Partanen nous racontait que :
[quoted text clipped - 18 lines]
> before doing the merge. If one is missing, do not initiate the merge (thus
> avoiding crashes...).
Jean-Guy Marcil - 14 Oct 2005 15:10 GMT
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.

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

Markku Partanen - 14 Oct 2005 22:00 GMT
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

> Markku Partanen was telling us:
> Markku Partanen nous racontait que :
[quoted text clipped - 21 lines]
> 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.
Jean-Guy Marcil - 14 Oct 2005 23:15 GMT
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!

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

Markku Partanen - 15 Oct 2005 15:36 GMT
Oki thanks for engaging
/Markku

> Markku Partanen was telling us:
> Markku Partanen nous racontait que :
[quoted text clipped - 12 lines]
> 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!

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.