mailmerge macro

I

iris

Hi everybody!
I want to create a macro for mail merge that will allow me to open the
databace and peek the people I wan't to mail to, and only then - continue to
execute the mailed letters.
I've tried to record a macro by doing it step by step in word itself but
this macro saves the people I chose and does not allow me to change my
selection the next time I run this macro...

I hope someone will be able to help me do that...
 
D

Doug Robbins - Word MVP

You do not need a macro to do that. From the View menu, select Toolbars and
then check the Mail Merge toolbar item. It has a button on it that will
allow you to view the recipients of your mail merge.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
I

iris

Hello Doug!

Thank you for your reply!

I know I can do this through the rulers of word... but since I am making a
macro that creates both mailmerge according to specific cells in access db I
want to enable this feacher also in this userform so people that are not so
"great" with computers or word it self will find it easy to merge mail.

I also know that there is a buildin macro in word that opens the data
recipients: MailMergeRecipients.... but I don't know how to open it in my
userform...

I will be very grateful for any help in doing that....

Thank you

Iris
 
I

iris

Hi Doug

I have a question in a totaly different subject. I tried posting it in a new
posting - but failed. I hopr you can help me with that...

I have a userform in word with 1 listbox and 3 textboxes.

the database is an access database with 7 columns.

I am initializing the listbox with 7 columnbound columns.

this is my code:

Private Sub UserForm_Initialize()
On Error Resume Next

Dim dbDatabase As Database
Dim rsd As Recordset
Dim d As Integer
Set dbDatabase = OpenDatabase("C:\nihul.mdb")
Set rsd = dbDatabase.OpenRecordset("SELECT * FROM expressions ORDER BY
heb;", dbOpenSnapshot)

ListBox1.Clear
d = 0
With rsd
Do Until .EOF
ListBox1.AddItem (d)
ListBox1.ColumnCount = 3
ListBox1.BoundColumn = 7
ListBox1.ColumnWidths = "4 in;4 in;0.5 in;"
ListBox1.Column(6, d) = ![hebrt]
ListBox1.Column(0, d) = ![heb]
ListBox1.Column(1, d) = ![eng]
ListBox1.Column(2, d) = ![engRT]
.MoveNext
d = d + 1
Loop
End With

rsd.Close
dbDatabase.Close
Set rsd = Nothing
Set dbDatabase = Nothing
End Sub

after initializing the list box, I want to click on an item in the listbox
and see the coloumnbound data from the database in the 3 textboxes (each
column in an other textbox).

Thank you in advance for your help!

Iris
 
D

Doug Robbins - Word MVP

PLEASE LOOK AT MY RESPONSES TO YOUR OTHER QUESTION WITH THE SUBJECT OF
CASCADING LIST BOXES.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
iris said:
Hi Doug

I have a question in a totaly different subject. I tried posting it in a
new
posting - but failed. I hopr you can help me with that...

I have a userform in word with 1 listbox and 3 textboxes.

the database is an access database with 7 columns.

I am initializing the listbox with 7 columnbound columns.

this is my code:

Private Sub UserForm_Initialize()
On Error Resume Next

Dim dbDatabase As Database
Dim rsd As Recordset
Dim d As Integer
Set dbDatabase = OpenDatabase("C:\nihul.mdb")
Set rsd = dbDatabase.OpenRecordset("SELECT * FROM expressions ORDER BY
heb;", dbOpenSnapshot)

ListBox1.Clear
d = 0
With rsd
Do Until .EOF
ListBox1.AddItem (d)
ListBox1.ColumnCount = 3
ListBox1.BoundColumn = 7
ListBox1.ColumnWidths = "4 in;4 in;0.5 in;"
ListBox1.Column(6, d) = ![hebrt]
ListBox1.Column(0, d) = ![heb]
ListBox1.Column(1, d) = ![eng]
ListBox1.Column(2, d) = ![engRT]
.MoveNext
d = d + 1
Loop
End With

rsd.Close
dbDatabase.Close
Set rsd = Nothing
Set dbDatabase = Nothing
End Sub

after initializing the list box, I want to click on an item in the listbox
and see the coloumnbound data from the database in the 3 textboxes (each
column in an other textbox).

Thank you in advance for your help!

Iris


Doug Robbins - Word MVP said:
You do not need a macro to do that. From the View menu, select Toolbars
and
then check the Mail Merge toolbar item. It has a button on it that will
allow you to view the recipients of your mail merge.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top