Results 1 to 2 of 2
  1. #1
    jcc285 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2014
    Posts
    70

    Trap a 'Cancel' click from a Mail Merge dialog box

    I am opening a Mail Merge dialog with, DoCmd.RunCommand acCmdWordMailMerge. This is then fine as long as the user clicks 'OK'. i.e. picks a Word Document.



    Can anyone tell me how to trap the possibility that the user clicks 'Cancel' or 'closes the dialog'

    I want :

    If ???????????? = Cancel or Close then
    Do Something
    End If

    I don't know to address the pop up dialog

    Any help gratefully received.
    Attached Thumbnails Attached Thumbnails Mail Merge.JPG  

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Google: access acCmdWordMailMerge

    Review http://access.mvps.org/access/RunCom...deex/2-195.htm

    Darn! Just tested that error handler and not working. Seems the value of Err when the dialog is canceled is 0 not 2501.

    Might be interested in this approach http://www.minnesotaithub.com/2015/1...ba-and-access/
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. File dialog Cancel issue
    By KWarzala in forum Modules
    Replies: 11
    Last Post: 05-09-2014, 01:54 PM
  2. Replies: 4
    Last Post: 02-16-2014, 06:30 PM
  3. Replies: 1
    Last Post: 09-14-2012, 10:27 AM
  4. Can't cancel the ‘find’ dialog in modal form
    By AndrewAfresh in forum Access
    Replies: 0
    Last Post: 09-23-2011, 11:12 AM
  5. Click a Button to Run Word Mail Merge...
    By nchesebro in forum Programming
    Replies: 6
    Last Post: 03-09-2011, 01:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums