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
-
Attack on LexisNexis Risk Solutions exposes data on 300k +
by
Nibbled To Death By Ducks
1 hour, 52 minutes ago -
Windows 11 Insider Preview build 26200.5622 released to DEV
by
joep517
7 hours, 44 minutes ago -
Windows 11 Insider Preview build 26120.4230 (24H2) released to BETA
by
joep517
7 hours, 45 minutes ago -
MS Excel 2019 Now Prompts to Back Up With OneDrive
by
lmacri
10 hours, 52 minutes ago -
Firefox 139
by
Charlie
10 hours, 8 minutes ago -
Who knows what?
by
Will Fastie
2 hours, 50 minutes ago -
My top ten underappreciated features in Office
by
Peter Deegan
8 hours, 29 minutes ago -
WAU Manager — It’s your computer, you are in charge!
by
Deanna McElveen
2 hours, 52 minutes ago -
Misbehaving devices
by
Susan Bradley
10 hours, 37 minutes ago -
.NET 8.0 Desktop Runtime (v8.0.16) – Windows x86 Installer
by
WSmeyerbos
1 day, 14 hours ago -
Neowin poll : What do you plan to do on Windows 10 EOS
by
Alex5723
7 hours, 55 minutes ago -
May 31, 2025—KB5062170 (OS Builds 22621.5415 and 22631.5415 Out-of-band
by
Alex5723
1 day, 12 hours ago -
Discover the Best AI Tools for Everything
by
Alex5723
12 hours, 11 minutes ago -
Edge Seems To Be Gaining Weight
by
bbearren
1 day, 3 hours ago -
Rufus is available from the MSFT Store
by
PL1
1 day, 11 hours ago -
Microsoft : Ending USB-C® Port Confusion
by
Alex5723
2 days, 14 hours ago -
KB5061768 update for Intel vPro processor
by
drmark
13 hours, 58 minutes ago -
Outlook 365 classic has exhausted all shared resources
by
drmark
12 hours, 41 minutes ago -
My Simple Word 2010 Macro Is Not Working
by
mbennett555
2 days, 9 hours ago -
Office gets current release
by
Susan Bradley
2 days, 12 hours ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
4 days, 2 hours ago -
Windows AI Local Only no NPU required!
by
RetiredGeek
3 days, 11 hours ago -
Stop the OneDrive defaults
by
CWBillow
4 days, 3 hours ago -
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
4 days, 13 hours ago -
X Suspends Encrypted DMs
by
Alex5723
4 days, 15 hours ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
4 days, 15 hours ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
4 days, 16 hours ago -
OpenAI model sabotages shutdown code
by
Cybertooth
4 days, 17 hours ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
4 days, 5 hours ago -
Enabling Secureboot
by
ITguy
4 days, 12 hours ago
Recent blog posts
Key Links
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
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.