LisaM Level: Trainee
 Registered: 02-02-2007 Posts: 1
|
Re: Non-printing Controls
Judging from the date of you post, this probably is too late to be useful to you -- but maybe someone else will find it helpful...
I just did this with some forms by setting the selected text (including cmdButtons) as "hidden" text (select the text, then on Word main menu, Format | Font, then check "Hidden" on the Font tab of the Font dialog box).
Once you have the desired text (and buttons) marked as hidden in the document, add the following code. (Theoretically, only the .View.ShowHiddenText value below should be necessary. However, it seems that periodically opening the form causes the status bar and the scroll bars to disappear. This should not have been happening -- and it was inconsistent and unpredictable -- but since it did seem to be
tied to opening the form, decided to put the following in to override whatever was happening.)
Private Sub Document_Open()
'Display hidden text on screen, but don't print it
Application.DisplayStatusBar = True 'optional see above
Application.ShowWindowsInTaskbar = True 'opt see above
Application.ShowStartupDialog = True 'opt see above
With ActiveWindow
.DisplayHorizontalScrollBar = True 'opt see above
.DisplayVerticalScrollBar = True 'opt see above
.DisplayScreenTips = True 'opt see above
.View.ShowHiddenText = True 'required
End With
Options.PrintHiddenText = False 'required
End Sub
|