Hi
You can use either a bookmark or a content control, that's entirely up to you and how you structure the document.
To hide the text in a content control:
ActiveDocument.ContentControls.Item(1).Range.Font. Hidden=1
To show the text in a content control:
ActiveDocument.ContentControls.Item(1).Range.Font. Hidden=0
To hide text in a bookmark range:
ActiveDocument.Bookmarks("BookmarkName").Range.fon t.hidden=1
To show text in a bookmark range:
ActiveDocument.Bookmarks("BookmarkName").Range.fon t.hidden=0
To hide the hidden fonts from view:
Activewindow.View.ShowHiddenText = False
ActiveWindow.View.ShowAll=False
If you toggle show/hide button you will still be able to see the hidden text, but it won't print.
If you want the text completely removed, use bookmark ranges and input contents by automating autotext entries.
Let me know if you need help with the later.
|