Hiding a section

T

Tobias Schröer

Hi,

is it possible to programatically hide/unhide a section in word 2003?
Something like Section.Visible = false, which does not exist :( I have
not found it at least.

Background: I have a template that contains a header section, a content
section and an internal remaks section. When a document based on that
template is printed (from within a macro), the latter section should not
be printed. Therefore I want to hide it.
I tried to solve it using a textbox instead of a section for the
internal remarks, but the template is protected. In that case I cannot
edit a textbox :( Without document protection, the textbox solution
works perfectly (hide, print, unhide)
Another solution that came to my mind is to cut the last section's
content, then print and paste the content back to the section. However,
I'm trying to avoid this, as it appears to me, that this is not a clean
solution.

Thanks for your help,

Tobi
 
T

Tony Jollans

You can't hide a section- well, I suppose you *could* - but you can choose
which sections of a document to print by specifying Pages:="s1,s2" (or
whatever sections you want) on the PrintOut command.
 
T

Tobias Schröer

Tony said:
You can't hide a section- well, I suppose you *could* - but you can choose
which sections of a document to print by specifying Pages:="s1,s2" (or
whatever sections you want) on the PrintOut command.

That would do the trick. I'll give it a try. Thank you.
Sometimes the easiest solutions are best ;)

Tobi
 

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