Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-20-2018, 08:34 AM
Formd Formd is offline One letter for each person in a mergefield using VBA Windows 7 32bit One letter for each person in a mergefield using VBA Office 2007
Advanced Beginner
One letter for each person in a mergefield using VBA
 
Join Date: Feb 2015
Location: TX
Posts: 46
Formd is on a distinguished road
Default One letter for each person in a mergefield using VBA

Hello everyone. Once again, I am seeking your assistance.

I have a mergefield called SERVICES, with a number of persons listed with name and complete address. The list /field could be any number of persons from 1 to 20.
The mergefield could looks like this:
Mary Brown
123 Address One
City, State 12345

John Brown
234 Address Two
City, State 23456

Jack Brown
345 Address Three
City, State, 34567

One Two Three Association
456 Address Four
City, State 45678

The Alphabet Bank
567 Address Here
City, State 56789

I have a letter that I want to send to each person listed in my "SERVICES" mergefield.
I am not sure if I use "Do while" or "Loop" Or maybe some other method.

What do I want to Accomplish - From the list above, my outcome should have 5 letters. Each letter Should have one of the names and address from the SERVICES field.

EXAMPLE, one of the five letters would look something like this:

Mary Brown
123 Address One
City, State 12345




Dear Mary Brown:

This is a letter to advise you............

Sincerely

Bob Jones
Manager

How can I make this happen?
Reply With Quote
  #2  
Old 08-20-2018, 08:37 PM
gmayor's Avatar
gmayor gmayor is offline One letter for each person in a mergefield using VBA Windows 10 One letter for each person in a mergefield using VBA Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Post

While you could work with such a list, it would make more sense to convert the list to a conventional merge data file, ideally in Excel, in the format below, than to re-invent the wheel to suit your data.

ForeName |Surname |Address1 |City |State |Zip
Mary |Brown |123 Address One |City |State |12345


Then it is a simple matter to use conventional mail merge to create your letters. Or if you want them as separate documents see
http://www.gmayor.com/individual_merge_letters.htm. or

http://www.gmayor.com/MergeAndSplit.htm
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
I am not a VBScript person tiathetechwriter Word VBA 4 06-28-2018 03:57 PM
One letter for each person in a mergefield using VBA Use L and R arrow to move cursor letter to letter, not top of the line mellowkitten Word 2 05-12-2016 07:23 PM
Role of person marif300 Project 7 09-14-2015 08:26 AM
How to replace a letter to random letter with different color? cikanoz87 Word 7 06-18-2015 09:43 PM
One letter for each person in a mergefield using VBA Printing selected pages based on a MERGEFIELD.g. If MERGEFIELD=x then print pages 1,2,4 if MERGEFIEL Richard.p Word 3 04-21-2015 01:14 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:26 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft