?
Solved

Word Mail Merge - Format a Table based on the records contents

Posted on 2010-04-06
6
Medium Priority
?
300 Views
Last Modified: 2012-06-21
Hello Experts,
I have a WORD 2007 mail merge document and the data is in Excel 2007 with a DDE connection.  Some records require a small table of values to be included in the document and others do not.  Is there a way to selectively include the formatting to make the table display appear (Lines around the boxes and a blue hearder row) and then exclude the formatting for the records that do not require it (no lines around the boxes and no blue header row) which makes it look like nothing is in that area of the page.

Thanks,
Jerry
0
Comment
Question by:Jerry Paladino
  • 4
  • 2
6 Comments
 
LVL 77

Accepted Solution

by:
GrahamSkan earned 2000 total points
ID: 29905379
Create and format the table and include it in the True part of an IF field that tests the value of one of of the merge fields. Put the differently formatted version in the False part:

{ IF { MERGEFIELD textfield } = "Yes" <Formatted table here>  <unformatted table here> }
0
 
LVL 16

Author Comment

by:Jerry Paladino
ID: 29908509
Graham,
I understand the concept but I must have a syntax error that is not obvious to me.  Will you please look at the attached example files and let me know what I am missing.  
Thanks,
Jerry

EE-25728280.doc
EE-25728280.xls
0
 
LVL 16

Author Comment

by:Jerry Paladino
ID: 29915522
Graham,
I found the mistake.  I was missing the quote marks on either side of the table.  Once I added those it works fine.
Thank You,
Jerry
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
LVL 16

Author Closing Comment

by:Jerry Paladino
ID: 31711302
Graham,

Thank you for your help.  I appreciate your time!

Thanks,
Jerry
0
 
LVL 77

Expert Comment

by:GrahamSkan
ID: 29926038
Thanks and sorry I couldn't respond earlier. I got called away. I didn't show the quotes in my example, either.
0
 
LVL 16

Author Comment

by:Jerry Paladino
ID: 29928935
No problem Graham... what you gave me was enough to solve it and I learned something in the process that would have bitten me later if I had not had to think through it this time.  Thanks Again!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Preface: When I started this series, I used the term CommandBars because that is the Office Object class that it discusses. Unfortunately, when Microsoft introduced Office 2007, they replaced the standard Commandbar menus with "The Ribbon" and rem…
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Suggested Courses
Course of the Month4 days, 13 hours left to enroll

601 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