Solved

Only use the last record in an Excel sheet with a Word mail merge

Posted on 2016-08-24
5
38 Views
Last Modified: 2016-08-24
If I have an Excel sheet and I want to set up a mail merge so that it only picks up the last record entered...how do I set that up? Thanks
0
Comment
Question by:agwalsh
5 Comments
 
LVL 19

Assisted Solution

by:n2fc
n2fc earned 125 total points
Comment Utility
After setting up the mail merge, use the "Select Recipients" and "Edit Recipient List" buttons to select ONLY the last entry...

See: https://support.office.com/en-us/article/Mail-merge-using-an-Excel-spreadsheet-858c7d7f-5cc0-4ba1-9a7b-0a948fa3d7d3

... for a more detailed explanation & tutorial video...
0
 
LVL 31

Assisted Solution

by:Rob Henson
Rob Henson earned 125 total points
Comment Utility
If this is to occur on multiple occasions and on each occasion you want to only send mail to new entries into the list, I would add a field into the Excel sheet for "Mail Sent" and update the list each time mail is sent with a Y.

This field can then be used as a filter in the Mail Merge to filter the recipients to only those with blank in the Mail Sent field.

Thanks
Rob H
0
 
LVL 17

Accepted Solution

by:
xtermie earned 250 total points
Comment Utility
You can do your merge for selected records only
From your main document, go to the Mailings tab of the ribbon
Select the last record using the |> button
Do your merge for the last record only in Finish & Merge, by choosing current record only

If you want to automate this, you can use a macro (and assign it to a button on the quick access toolbar maybe in the document you have)
Sub mergelastrecord()
Dim wdOutputName As String
Dim wdInputName As Document
Dim x As Integer

Const wdDefaultLastRecord = 10 '(set last record)
wdOutputName = ThisDocument.Path & "\MyForm2.docx"
Set wdInputName = Application.ActiveDocument

With wdInputName.MailMerge
    .Destination = wdSendToNewDocument
    .SuppressBlankLines = True
    With .DataSource
        .LastRecord = wdInputName.MailMerge.DataSource.RecordCount
    End With
    .Execute Pause:=False
End With

' show and save output file
Application.Visible = True
Application.ActiveDocument.SaveAs wdOutputName

' cleanup
wdDoc.Close SaveChanges:=False
Set wdDoc = Nothing

End Sub

Open in new window

0
 

Author Comment

by:agwalsh
Comment Utility
Thanks to all of you. Excellent variety of possible solutions..
0
 

Author Closing Comment

by:agwalsh
Comment Utility
Excellent variety of solutions for users at different levels. Thanks as always - knew EE would come through :-)
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article describes how to use the Send to Mail Recipient command. The instructions apply generally to Office 2007 and later versions, but Microsoft® Word 2013 was used for the specific steps and figures.  What is Send to Mail Recipient? Send…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now