Re: How to forcibly kill the word session?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Veena (moon_vr_at_yahoo.com)
Date: 05/11/04

  • Next message: Graham Mayor: "Re: How to forcibly kill the word session?"
    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.


  • Next message: Graham Mayor: "Re: How to forcibly kill the word session?"

    Relevant Pages

    • Re: Combining colon statements on one line?
      ... >programming and came up with a very short if/else ... >scenario that demanded 4 lines due to the fact that ... >I have two dates without the millenium included. ... the conversion will only take one line. ...
      (comp.lang.python)
    • RE: Need to do a mailmerge from SQL2K from VB.NET
      ... When you are programming again Word, ... Actually we can record Macro to know how to do mailmerge ... Here is a link about how to automation Word in VB.NET ...
      (microsoft.public.office.developer.automation)
    • Re: Visual Basic text box
      ... If you're programming this in Visual Basic, then you need to address your ... Without knowing the internals of your ... file which the mailmerge uses. ... This reply is posted in the Newsgroup; please post any follow question or reply ...
      (microsoft.public.word.mailmerge.fields)
    • Re: how do you terminate an application?
      ... not with End and programming ... the rest stays betwen me and my shrink. ... The scenario you are reffering to as "posted elsewhere" is considered ... (And then only to persons with "AAA" clearance). ...
      (comp.lang.basic.visual.misc)
    • Re: Combining colon statements on one line?
      ... Dave Blackington wrote: ... > programming and came up with a very short if/else ... > scenario that demanded 4 lines due to the fact that ... > correct millenium. ...
      (comp.lang.python)