Solved

Formatting a single Mail Merge Field in word

Posted on 2009-05-10
5
624 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

777 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