hiding tables

B

bryan

I have a form upon where I need to hide form fields and text if another field
is populated.
I have done this with paragraphs and works great, however in this form the
fields and text are inside tables so the paragraph does not work.

ie:
ID: <CLID>
In paragraph to hide both I code
With ActiveDocument
ActiveDocument.Unprotect
.FormFields("CLID").Range.Paragraphs(1).Range.Font.Hidden = True
ActiveDocument.Protect wdAllowOnlyFormFields, NoReset

in this new form where I use this it will only hide the formfield.

How can I hide a whole table?

Thanks,
Bryan
 
J

Jean-Guy Marcil

bryan said:
I have a form upon where I need to hide form fields and text if another field
is populated.
I have done this with paragraphs and works great, however in this form the
fields and text are inside tables so the paragraph does not work.

ie:
ID: <CLID>
In paragraph to hide both I code
With ActiveDocument
ActiveDocument.Unprotect
.FormFields("CLID").Range.Paragraphs(1).Range.Font.Hidden = True
ActiveDocument.Protect wdAllowOnlyFormFields, NoReset

in this new form where I use this it will only hide the formfield.

How can I hide a whole table?

Have you tried:

.FormFields("CLID").Range.Tables(1).Range.Font.Hidden = True

???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top