Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Mail merge macro: select recipients from Excel during merge

Note: I had posted this in the Word Forum, but no help. I'm posting here
because I'm using an Excel spreadsheet as my database.

I am not a programmer. Im working in Word and Excel 2003.

Scenario: I'm creating a dashboard of sorts. Users will click a Command
Button in a Word document to merge the same database (Excel spreadsheet) with
various documents that are already set up with merge fields.

When they click the button, a message box €œAre You Sure?€ pops up in case
they clicked the button in error. After that, they are given the opportunity
to
browse for the document they want to merge (database and merge fields already
in place). After that, Id like them to be able to choose the recipients
because they will not always need to create a document for everyone. Then the
merge will finish, creating new documents (so user can view before
printing).

Below is the code I have so far. It works, but I have no idea how to set
this up so the user can choose the recipients.

Can someone help with this, remembering that I'm not a programmer. Thanks in
advance.

Private Sub CommandButton4_Click()
' Events_TentCard Macro
' Macro recorded 5/11/2008 by Peggy Duncan
'
If MsgBox(Prompt:="Are You Sure?", Buttons:=vbYesNo + vbQuestion, _
Title:="Mail Merge Document") = vbNo Then
Exit Sub
End If

Dialogs(wdDialogFileOpen).Show
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=False
End With
'
End Sub



--
Peggy Duncan, Author
Conquer Email Overload with Outlook
http://www.PeggyDuncan.com


--
Peggy Duncan, Author
Conquer Email Overload with Outlook
http://www.PeggyDuncan.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
merge two excel files like in word mail merge azmerritt Excel Discussion (Misc queries) 1 December 11th 16 09:23 PM
I am asked twice to select an excel table in mail merge VMPeters Excel Discussion (Misc queries) 1 June 18th 09 08:37 PM
Mail Merge Without Recipients - Is It Something Else? Dave Excel Discussion (Misc queries) 0 September 12th 07 05:10 PM
Email/Mail Merge document lines to specific multiple recipients JDenise Excel Discussion (Misc queries) 1 March 14th 07 01:39 PM
Can't edit or Refresh under mail merge recipients Jennifer Mcdermeit Excel Discussion (Misc queries) 1 July 25th 06 01:59 PM


All times are GMT +1. The time now is 06:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"