Mailmerge to Word - How to suppress message...

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

From: Linda (anonymous_at_discussions.microsoft.com)
Date: 03/04/04


Date: Thu, 4 Mar 2004 02:45:45 -0800

I have written the following routine that performs a
mailmerge to word. This works fine execpt that my users
are always getting the following error message:

"Word is currently printing. Quitting Word will Cancel all
Print Jobs. Do you want to Quit Word?".

Is there any way to supress this message? - TIA.

 Set objWord = CreateObject("Word.Application")
         
    DoCmd.Hourglass True
    Echo True, "Printing Memorandum...."
    objWord.Documents.Open
("C:\temp\outstandingbill2.doc")
    objWord.Application.Visible = False
    XOriginalPrinter = objWord.Application.ActivePrinter
    objWord.Application.ActivePrinter = "\\SERVER01
\PRINT01"
    objWord.ActiveDocument.PrintOut
    objWord.Application.ActivePrinter = XOriginalPrinter
    objWord.ActiveDocument.Saved = True
    objWord.Quit
    Set objWord = Nothing
    DoCmd.Hourglass False



Relevant Pages

  • Re: Text Marked with "Do not check ....."Spell Check
    ... With regard the Find routine, you don't need a style, or anything really, in ... I don't see how to select a style to start the Find routine. ... (Bummer - now that I want the error message I can't get ... My spell check message gremlin has returned. ...
    (microsoft.public.word.newusers)
  • Re: Can I get form name / routine name from Access?
    ... I currently hard code the name of my routine in my error message ... so I can display it in the error message. ...
    (microsoft.public.access.formscoding)
  • RE: Linking worksheet event codes
    ... > Expected End Sub. ... > automatically) I received the earlier mentioned Error message. ... >> Simply call his routine from yours, just before you end your routine ... >> Or vice versa of course, depending on which one you want to execute first ...
    (microsoft.public.excel.worksheet.functions)
  • Re: "you and another user..."--standard fixes dont apply
    ... It happens in a routine that writes the record back to the server, from the temp tables. ... I have compacted, rebuilt the tables, written all data to new tables on a clean blank database, I believe there is no data corruption. ... You could search for On Err and replace with 'On Err for the problem forms code so the code can get into Debug? ... In your error message do you have the routine it breaks on. ...
    (comp.databases.ms-access)
  • Re: Close #FNbr
    ... The error message says that the file is in use by another application ... Reset closes all other open files and I do not want to do this. ... But Rest do finally close it and allows the file size routine and any ... Is it something to do with declaring Lock Read Write when I have created ...
    (microsoft.public.vb.general.discussion)