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

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
LVL 16
Jerry PaladinoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GrahamSkanRetiredCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jerry PaladinoAuthor Commented:
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
Jerry PaladinoAuthor Commented:
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
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Jerry PaladinoAuthor Commented:
Graham,

Thank you for your help.  I appreciate your time!

Thanks,
Jerry
0
GrahamSkanRetiredCommented:
Thanks and sorry I couldn't respond earlier. I got called away. I didn't show the quotes in my example, either.
0
Jerry PaladinoAuthor Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Word

From novice to tech pro — start learning today.