Stop printing Window Showing 
Author Message
 Stop printing Window Showing

Hi,
I am very new to programming Word and this may be a simple problem, but I
can't find an answer.

I have set up a mail merge from Access, to a template in Word which runs the
macro when opened,

With ActiveDocument.Mailmerge
        .destination = wdSendToPrinter
        .Execute
End with
Application.Quit

This works well except that the Print Window appears, and I want the whole
process to happen without any input from the user.  Any assistance
greatfully received.
Many thanks
Cath



Thu, 04 Sep 2003 01:01:28 GMT  
 Stop printing Window Showing
Hi Cath,

I know of two different options.
One would require the Sendkeys method, but I'm not really in favour of that
one since it's not considered to be reliable. Other idea might be to merge
the results to a new document, print that one and close if needed.

Hope this helps,
regards,
Astrid

So that all can benefit from the discussion, please post all follow-ups to
the newsgroup.
Visit the MVP Word FAQ site at http://www.mvps.org/word/



| Hi,
| I am very new to programming Word and this may be a simple problem, but I
| can't find an answer.
|
| I have set up a mail merge from Access, to a template in Word which runs
the
| macro when opened,
|
| With ActiveDocument.Mailmerge
|         .destination = wdSendToPrinter
|         .Execute
| End with
| Application.Quit
|
|
| This works well except that the Print Window appears, and I want the whole
| process to happen without any input from the user.  Any assistance
| greatfully received.
| Many thanks
| Cath
|
|
|



Thu, 04 Sep 2003 05:00:48 GMT  
 Stop printing Window Showing
Hi Cath,

The second method suggested by Astrid is the one to follow.  The required
change to your code would be:

With ActiveDocument.MailMerge
         .Destination = wdSendToNewDocument
         .Execute
End With
ActiveDocument.PrintOut
ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
Application.Quit

Please post any follow-up or new questions to the Newsgroups so that others
may benefit therefrom or contribute thereto.

Hope this helps,
Doug Robbins - Word MVP

Quote:

> Hi,
> I am very new to programming Word and this may be a simple problem, but I
> can't find an answer.

> I have set up a mail merge from Access, to a template in Word which runs
the
> macro when opened,

> With ActiveDocument.Mailmerge
>         .destination = wdSendToPrinter
>         .Execute
> End with
> Application.Quit

> This works well except that the Print Window appears, and I want the whole
> process to happen without any input from the user.  Any assistance
> greatfully received.
> Many thanks
> Cath



Thu, 04 Sep 2003 10:31:46 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How do I stop Info Popup window from showing

2. (VB5) how to stop window animation when i stop my program

3. Print shows blank fields, Preview shows actual data

4. Showing inactive windows on top or showing always...

5. Showing inactive windows on top or showing always...

6. Stop showing alerts when sending mail by code.

7. REQ: Snippet showing how to set tab stops in a list control

8. how to stop showing up in task box?

9. DoEvent Loop Stops Slide show

10. Moving forms stop tray tooltips from showing....

11. Stop showing tooltips from treeview ?

12. Stop pictures showing in Webbrowser control

 

 
Powered by phpBB® Forum Software