I have a spreadsheet with several sheet tabs, each with a list of addressees. To create my letters, I mail merge to Word using the named range on sheet one, then I want to move to the named range on sheet two. The ranges are similar in each sheet, same col heads etc. so Word picks up my new merge data okay. However it means re-attaching the data source from scratch each time. I would like to just ‘go up a level’ and select the next sheet tab range as if it was files in a folder but can’t see how to. TIA for any help with this. Frank
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Quickly switch excel data source in Word mail merge operation
Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Quickly switch excel data source in Word mail merge operation
- This topic has 4 replies, 3 voices, and was last updated 13 years, 3 months ago.
AuthorTopicWSfrankwalsh1962
AskWoody LoungerFebruary 17, 2012 at 7:20 am #481627Viewing 3 reply threadsAuthorReplies-
macropod
AskWoody_MVPFebruary 18, 2012 at 5:50 am #1320294 -
Charles Kenyon
AskWoody Lounger -
Charles Kenyon
AskWoody LoungerFebruary 18, 2012 at 7:12 am #1320303What follows is excerpted from a macro that I use every day. It was based on a recorded macro so isn’t necessarily “elegant” but it works.
Code:Sub AttachClients() ' Written by Charles Kenyon ' 19 April 2005 revised 15 December 2006 ' ' Makes activedocument a mailmerge (letter) document and ' attaches data.xls from [path]. ' On Error Resume Next ' ' Name of file Dim strFileName As String Dim strProvider As String strFileName = [path]Data.xls" ' ' Attach Merge list ActiveDocument.MailMerge.OpenDataSource strFileName, , , False, _ True, False, "", "", False, "", "", "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=strFileName;Mode=Read;Extended Properties=""HDR=YES;IMEX=1;"";Jet OLEDB:" _ , "SELECT * FROM `Clients$`", "", , wdMergeSubTypeAccess ' ' Show merge data ActiveDocument.MailMerge.ViewMailMergeFieldCodes = False ' End Sub
Note that if you use this you would have to put in your actual path and filename. I believe that `Clients$` indicates the named range that is used.
I wrote this because I use individual documents from a merge and when done with a merge I change the merge file back to a normal word document (retaining the merged data in preview mode) and save it. This lets me reopen the document without worrying about it updating to a different client’s data. If I want to use the document with a different client, I just use the macro and pick a different client.
-
WSfrankwalsh1962
AskWoody Lounger
Viewing 3 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Is Aegean Airlines Safe to Fly? A Complete Safety Guide (Awaiting moderation)
by
jacksmith243
29 minutes ago -
Microsoft-Backed Builder.ai Set for Bankruptcy After Cash Seized
by
Alex5723
2 hours, 23 minutes ago -
Location, location, location
by
Susan Bradley
2 hours, 52 minutes ago -
Cannot get a task to run a restore point
by
CWBillow
3 hours, 49 minutes ago -
What is wrong with simple approach? (Awaiting moderation)
by
WSSpoke36
8 hours ago -
Frustrating search behavior with Outlook
by
MrJimPhelps
18 minutes ago -
June 2025 Office non-Security Updates
by
PKCano
14 hours, 34 minutes ago -
Secure Boot Update Fails after KB5058405 Installed
by
SteveIT
7 hours, 15 minutes ago -
Firefox Red Panda Fun Stuff
by
Lars220
14 hours, 30 minutes ago -
How start headers and page numbers on page 3?
by
Davidhs
1 day ago -
Attack on LexisNexis Risk Solutions exposes data on 300k +
by
Nibbled To Death By Ducks
3 hours, 36 minutes ago -
Windows 11 Insider Preview build 26200.5622 released to DEV
by
joep517
1 day, 9 hours ago -
Windows 11 Insider Preview build 26120.4230 (24H2) released to BETA
by
joep517
1 day, 9 hours ago -
MS Excel 2019 Now Prompts to Back Up With OneDrive
by
lmacri
23 hours, 18 minutes ago -
Firefox 139
by
Charlie
15 hours, 53 minutes ago -
Who knows what?
by
Will Fastie
6 hours, 15 minutes ago -
My top ten underappreciated features in Office
by
Peter Deegan
1 day, 10 hours ago -
WAU Manager — It’s your computer, you are in charge!
by
Deanna McElveen
1 day, 4 hours ago -
Misbehaving devices
by
Susan Bradley
6 hours, 3 minutes ago -
.NET 8.0 Desktop Runtime (v8.0.16) – Windows x86 Installer
by
WSmeyerbos
2 days, 16 hours ago -
Neowin poll : What do you plan to do on Windows 10 EOS
by
Alex5723
13 hours, 37 minutes ago -
May 31, 2025—KB5062170 (OS Builds 22621.5415 and 22631.5415 Out-of-band
by
Alex5723
2 days, 14 hours ago -
Discover the Best AI Tools for Everything
by
Alex5723
1 day, 14 hours ago -
Edge Seems To Be Gaining Weight
by
bbearren
2 days, 5 hours ago -
Rufus is available from the MSFT Store
by
PL1
2 days, 13 hours ago -
Microsoft : Ending USB-C® Port Confusion
by
Alex5723
3 days, 16 hours ago -
KB5061768 update for Intel vPro processor
by
drmark
1 day, 15 hours ago -
Outlook 365 classic has exhausted all shared resources
by
drmark
1 day, 14 hours ago -
My Simple Word 2010 Macro Is Not Working
by
mbennett555
3 days, 11 hours ago -
Office gets current release
by
Susan Bradley
3 days, 14 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.