Solved

Formatting a single Mail Merge Field in word

Posted on 2009-05-10
5
623 Views
Last Modified: 2013-11-27
Hi Experts,

I do a mailmerge from Access to Word that works fine. I export my query to Excel ,& the word template is connected to that Excel File.

One of the merge fields I have is "CC" which holds Clients Names + emails one after another eg
John Graham:John@Microsoft.com David Abbott:David@Hackney.com Steve Mcnamara Steve@Downs.co.uk

My challenge is to format the names in black & the emails in blue & underline them, without having to create multiple merge fields.



0
Comment
Question by:tbsgadi
  • 2
  • 2
5 Comments
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 24351477
Hi Gary,
>>>>>>> My challenge is to format the names in black & the emails in blue & underline them, without having to create multiple merge fields.<<<<<<<<<

If your statement "w/o having to create multiple merge fields, means that you don't want to have to create additional merge fields other than the ones you already have, Correct?

then the solution below should work for you:
See this link:   http://www.officearticles.com/word/merge_field_formatting_in_microsoft_word.htm

If you look at the example of the mergefields before and after, it is pretty easy to follow.  all you need to do is highlight the mergefield you already have for CC, then go to the toolbar, select the font color button, select black, etc and save the merge document.

HTH


0
 
LVL 46

Author Comment

by:tbsgadi
ID: 24351853
I don't think you understood.
Each CC field holds multiple names & emails.
What I'm  looking for is to use conditional formatting within that one field & by adding extra delimiters to the data to be able to format different parts of the field separately.
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 24352114
Its not what you want, but the easiest way would be to create a limited number of fields, one for each correspondent.
The alternative is to do some post-merge processing on the result document with a VBA macro which searches or the CC text and parses the text into its separate parts.
0
 
LVL 46

Author Comment

by:tbsgadi
ID: 24352191
Is there anyway I could put a VBA function inside an { IF {Mergefield}} & end up with something like Fig 4 of this article
http://msdn.microsoft.com/en-us/library/aa140197(office.10).aspx




0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 24352810
I'm afraid not. You can't call VBA code inside a field like that.

Apart from the formatting, you have the classic problem on wanting to do a one-to-many merge, which word just doesn't do. That is why I used the word 'limited'.

I made a few suggestions here:

http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_24082736.html?sfQueryTermInfo=1+10+do+doesn%27t+mailmerg+mani+on
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I'm writing to share my clumsy experience in using this elegant tool so you can avoid every stupid mistake I made. (I leave it to the authorities to decide if this deserves a place in the Knowledge archives.)  Now that I am on the other side of my l…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

895 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