Re: How to forcibly kill the word session?
From: Veena (moon_vr_at_yahoo.com)
Date: 05/11/04
- Previous message: Graham Mayor: "Re: how to insert a file in mail merge document"
- In reply to: Graham Mayor: "Re: How to forcibly kill the word session?"
- Next in thread: Graham Mayor: "Re: How to forcibly kill the word session?"
- Reply: Graham Mayor: "Re: How to forcibly kill the word session?"
- Messages sorted by: [ date ] [ thread ]
Date: 11 May 2004 01:01:15 -0700
Thank you for the suggestion Graham !!!
But, actually we are trying to cater to the generic scenario when word
hangs.
In a normal scenario ,after doing a mailmerge (programmatically), the
merged output document is produced and the subsequent mail merges go
through fine.
But, in some cases, the mail merge fails, eg,it pop-ups some dialogs,
like "Record and header delimiter" or "invalid merge field". These
dialogs require manual intervention but, programmatically it is
difficult to supress these dialogs, the reason being there are
multiple scenarios or worse still the WORD session itself is hidden.
Thus, i need a generic solution wherein, if the word hangs or is in a
inconsistent state, i can forcibly kill it, open a fresh session again
and continue the mailmerges.
Please advice!!
Thanks & Regards,
Veena.
"Graham Mayor" <gmayor@NOSPAMmvps.org> wrote in message news:<#03BE5nNEHA.268@TK2MSFTNGP11.phx.gbl>...
> If you can find a way to forcibly kill Word using vba that is also hung, and
> then manage to deal with all the problems created by orphaned temporary
> files that crashing Word will leave behind and the possibility that
> autorecover may or may not be active on the target machine, then that would
> be a nifty piece of programming.
>
> I would have thought a better approach would have been to error trap the
> problems that are likely to occur so that it doesn't hang in the first
> place. I suggest posting the errant part of the code in one of the vba
> newsgroups with a request for how best to error trap that aspect of it.
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
> Graham Mayor - Word MVP
>
> Web site www.gmayor.com
> Word MVP web site www.mvps.org/word
> <>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
>
>
>
> Veena wrote:
> > Hi,
> > We have a VB program which opens word documents and data source and
> > performs mailmerge programmatically.
> > Whenever there is a problem with mailmerge (eg: some mergefields are
> > missing) the word session hangs.
> > Can you please tell me a method wherein i can forcible kill the word
> > session. I tried calling the Quit method on WordApplication object and
> > close method on the word docs which are open. Both the statements hang
> > as word itself has hanged.
> > How do i forcible kill the word session programmatically ....
> > Any help would be greatly appreciated.
> >
> > Thanks & Regards,
> > Veena.
- Previous message: Graham Mayor: "Re: how to insert a file in mail merge document"
- In reply to: Graham Mayor: "Re: How to forcibly kill the word session?"
- Next in thread: Graham Mayor: "Re: How to forcibly kill the word session?"
- Reply: Graham Mayor: "Re: How to forcibly kill the word session?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|