Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Apr 2002
    Location
    Sydney, Australia
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Control Select all from Mail Merge Recipients (Word 2002, VBA)

    Hello

    I use the following code to display the Mail Merge Recipients list in a vba macro:

    Dialogs(wdDialogMailMergeRecipients).show

    By default all receipients are selected. I would however like the 'select' checkbox for all recipients to be cleared by default, as if the user has selected the "Clear All" button. Does anyone know what setting I can use to control this?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Control Select all from Mail Merge Recipients (Word 2002, VBA)

    You will probably have to put a SendKeys instruction above the Dialogs(...).Show instruction. At the moment, I can't check which letter in "Clear All" is underlined. Alt + that letter is the shortcut for Clear All. Let's say it is the C; in that case you would use

    SendKeys "%C" ' % stands for the Alt key
    Dialogs(wdDialogMailMergeRecipients).Show

  3. #3
    Lounger
    Join Date
    Apr 2002
    Location
    Sydney, Australia
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Control Select all from Mail Merge Recipients (Word 2002, VBA)

    Thanks for your speedy reply. I just tried this and it didn't work. I also tried :

    SendKeys "%{A}"

    but this didn't work either.

    Any other ideas?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Control Select all from Mail Merge Recipients (Word 2002, VBA)

    It appears that the Mail Merge Recipients dialog ignores keystrokes sent by SendKeys completely.

    According to the online help, the dialog has no arguments, so I'm stumped on this one. Unless somebody else comes up with a bright idea, I guess you'll have to live with this behavior. Sorry!

  5. #5
    Lounger
    Join Date
    Apr 2002
    Location
    Sydney, Australia
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Control Select all from Mail Merge Recipients (Word 2002, VBA)

    Yes, very weird. I'll have to go back to the drawing board on this one!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •