Microsoft Word - Directory Mail Merge and then email using Outlook

Asked By s k
19-May-09 07:06 PM

Hi All,

 

I am new to this forum. I couldn't find specific to Outlook group so posting here.

 

I am looking for some help in creating a directory mail merge. I have data in spreadsheet in the following format.

 

Publisher

Books

Email

PubA

Title One

abc@test.com

PubA

Title Two

abc@test.com

PubA

Title Three

abc@test.com

PubB

Book One

xyx@abc.com

PubB

Book Two

xyx@abc.com

PubC

One Volume

mnop@abd.net

PubD

Another Text

email@newemail.com

PubE

First of Many Books

last@last.edu.com

PubE

Second of Many Books

last@last.edu.com

PubE

Third of Many Books

last@last.edu.com

PubE

Last of Many Books

last@last.edu.com

 

I have created a directory mail merge in which I have got one letter for each publisher consisting of books list I need to order. i.e. One letter to PubA with all three titles. My letter varies with publisher according to number of books.

 

The problem I am facing is how to email these letters to just one email Id using outlook.

For example, I want to send my directory mail merge to Publisher PubA just once on his email abc@test.com and not three times as shown in my excel spreadsheet.

 

I have tried merging with new documents and emailing but it mails all 5 letters together to all the emails present in the spreadsheet.

 

I want individual letters to specific recipients only.

 

I hope I have explained my problem. Any feedback or help would be highly appreciated. Thanks in advance.

 

-Aroma

VBA Solution  VBA Solution

21-May-09 08:51 PM

Hi there:

I would suggest to run the macro listed below on your worksheet (make sure to set topCell to the cell the first occurrence of PubA is located in (I assumed it might be A2). I have uploaded a workbook that contains both your original sample and the aggregated version: http://www.eggheadcafe.com/fileupload/629396994_BookListAggregation.zip (please note that although the file extension is .zip this is actually an Excel workbook; you'll need to rename it to *.xls before you open it).

Please don't hesitate to contact me if you have any further questions.

Good luck,
Rolf Jaeger
SoarentComputing
http://soarentcomputing.com
510.300.7462

Sub AggregateBooks()
    Dim topCell As Range
    Dim iRow As Integer
    Dim nBooks As Integer
    
    Set topCell = Range("A2")
    
    iRow = 0
    Do
        nBooks = 0
        Do
            topCell.Offset(iRow + nBooks, 0).Select
            If topCell.Offset(iRow + nBooks + 1, 0).Value <> topCell.Offset(iRow + nBooks, 0).Value Then Exit Do
            topCell.Offset(iRow, 1).Value = topCell.Offset(iRow, 1).Value & Chr(10) & topCell.Offset(iRow + nBooks + 1, 1)
            nBooks = nBooks + 1
        Loop
        iRow = iRow + 1
        If nBooks > 0 Then
            Rows(iRow + 1 & ":" & iRow + nBooks).Select
            Selection.Delete
        End If
        If topCell.Offset(iRow, 0).Value = "" Then Exit Do
    Loop
End Sub
Create New Account
help
Microsoft Outlook Outlook I have used Outlook Express and I am presently using Mozilla Thunderbird for my email client. I would like to try Microsoft Outlook, but when I try to open it, I get a message "Can Not Start Microsoft Outlook". Microsoft Outlook is in my Microsoft Office folder and I use MS Word and Excel
Microsoft Outlook / Word AutoCorrect File Errors Word Microsoft Outlook / Word AutoCorrect File Errors Upon opening Microsoft Outlook and Word, I get the following AutoCorrect file errors. ???Your AutoCorrect file, symbolsMSO1033.acl
how to change from outlook express to microsoft outlook Word how to change from outlook express to microsoft outlook ? Word Document Management Discussions Microsoft Word (1) Outlook (1) Word (1) Control (1) Microsoft outlook (1
Attachment to microsoft word Outlook How do I attach a photo to a word document? Outlook General Discussions Outlook (1) Word (1) Attachment (1) Insert (1) Larry (1) Microsoft word (1) Word document (1) Add it to the other attachments you include in an
Microsoft Word Starts Only in Safe Mode after Adobe Acrobat Instal Word Microsoft Word will only start in Safe Mode ever since Adobe Acrobat was installed. It seems related to Adobe's automatic installation of toolbar objects in both Outlook and Word. Word reports that there were problems starting Word and tries to recover documents. It then wants