Make Table Invisible by using {IF {MERGEFIELD

Hi Experts,
Is it possible to make a whole word Table in a mailmerge document disappear/appear by just using {IF {MERGEFIELD
(ie not using VBA)
LVL 46
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.

Hello tbsgadi,

if i'm interpreting your question correct no you cannot work on other parts of a document with the IF{} mergefield condition only if the mergefield contains a table

hope this helps a bit
Save the table as Autotext and then remove it from the document.

{ IF {MERGEFIELD Field1} = "Tab1" { AUTOTEXT MyTable } "" }

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
tbsgadiAuthor Commented:
To Clarify:

With mergefield condition I can make a field "invisible"
Eg {IF {MERGEFIELD AccessField}<0 " " "Something"}

I want to know if I can somehow do that for a Table
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

yes i understood that, hadn't thought of the autotext as Graham came up with
tbsgadiAuthor Commented:
My Table also has Mergefields in it!
If not the table then can I do something to make the table borders disappear/appear?
what you can do is hide lines with the mergefields in it using the IF{} if that could mean that any borders around them would also become invisible i do not know but that would be worth a try
Is there a problem with having mergefields in the table?

@Graham, can you make some part autotext and still have mergefields in it?
I did a quick test with a merge field in one of the table cells, and it showed the table with the field value in the cell in the result document.

I'll try something more complex.
didn't knew that you could do that in the first place :-)
tbsgadiAuthor Commented:
I also came up with the idea of drawing lines inside the {IF}.
If noone comes up with a better Idea I'll go with that.
I have now tried displaying five fields inside the autotext table and it works OK for me.
tbsqadi, do you have problems with that?
tbsgadiAuthor Commented:
I'm looking at the  autotext table .
Looks excellent but I can't get the field { AUTOTEXT MyTable } to work!
tbsgadiAuthor Commented:
Learn new things Every Day:>
BTW where is the Autotext Saved? In the Template?
Yes. There is a box near the bottom of the AutoCorrect dialogue labelled 'Look in:', where you can choose between and any other Global template.
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.