Solved

Printer dialogue in a mail merged document from access

Posted on 2015-01-29
1
136 Views
Last Modified: 2015-01-29
For mail merging I am using following code:

    Set WWapp = CreateObject("Word.Application")
    Set WWdoc = WWapp.Documents.OPEN(dok & ".dotx")
    WWapp.Visible = True
    With WWdoc
        .MailMerge.MainDocumentType = wdFormLetters
        .MailMerge.OpenDataSource name:=dok & ".txt"
        .Application.Dialogs.Item(88).Display
        .MailMerge.Destination = wdSendToPrinter
        .MailMerge.Execute
    End With


The problem is, that in the dispalying printer dialogue I can change the printer only. All other manual settings including the cancel button will be ignored. How can I solve it?

Thank you very much.
0
Comment
Question by:User2008
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 51

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 40577061
Hi,

the cancel problem is resolved by

Res = .Application.Dialogs.Item(88).Display
If Res = 0 Then Exit Sub

Regards
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question