Reply
 
Thread Tools Display Modes
  #1   Report Post  
Tjones8611 Tjones8611 is offline
Junior Member
 
Posts: 0
Default ShowHiddenText assistance

I thought this was going to be simple, but I m ust be over complicating things. I’m using Word 2007 to create a report template. I have headings for multiple sections that I want displayed on the monitor, but not when the report is printed. I have used hidden text formatting and a macro to automate the “Hidden Text” under options-Display without any luck. Any advice or suggestions for code? Basically, I want to auto-enable “Hidden Text” anytime a user opens the template for creating a report.

Im using Word macro-Enabled Doc - .docm to create the template, not sure if this might be part of the problem

Code Im using:
With ActiveDocument
.ActiveWindow.View.ShowHiddenText = False 'Do not display hidden text
.Application.Options.PrintHiddenText = False 'Do not print hidden text
End With
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default ShowHiddenText assistance

Since you just want to prevent the hidden text from printing,
intercepting the FilePrint and FilePrintDefault commands should suffice.
Using Save As, turn your form into a macro-enabled template (if you
haven't already done that). Create a module and add the following code:

Sub FilePrint()
Dim IsHiddenTextPrinting As Boolean
IsHiddenTextPrinting = Options.PrintHiddenText

Options.PrintHiddenText = False
Dialogs(wdDialogFilePrint).Show

Options.PrintHiddenText = IsHiddenTextPrinting
End Sub

Sub FilePrintDefault()
Dim IsHiddenTextPrinting As Boolean
IsHiddenTextPrinting = Options.PrintHiddenText

Options.PrintHiddenText = False
ActiveDocument.PrintOut

Options.PrintHiddenText = IsHiddenTextPrinting
End Sub

Stefan Blom
Microsoft Word MVP





On 2012-07-17 16:36, Tjones8611 wrote:
I thought this was going to be simple, but I m ust be over complicating
things. I’m using Word 2007 to create a report template. I have headings
for multiple sections that I want displayed on the monitor, but not when
the report is printed. I have used hidden text formatting and a macro to
automate the “Hidden Text” under options-Display without any luck. Any
advice or suggestions for code? Basically, I want to auto-enable “Hidden
Text” anytime a user opens the template for creating a report.

Im using Word macro-Enabled Doc - .docm to create the template, not
sure if this might be part of the problem

Code Im using:
With ActiveDocument
.ActiveWindow.View.ShowHiddenText = False 'Do not display hidden
text
.Application.Options.PrintHiddenText = False 'Do not print hidden
text
End With





Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Assistance required Bryan Microsoft Word Help 1 February 2nd 09 11:03 AM
printing assistance ollie Microsoft Word Help 0 May 21st 08 04:38 PM
TOC Assistance Vinnie Microsoft Word Help 2 May 1st 08 03:11 PM
Assistance in template development ACA_Office Microsoft Word Help 1 September 29th 06 09:56 PM
autocorrect assistance MARISA Microsoft Word Help 1 August 3rd 06 09:14 AM


All times are GMT +1. The time now is 01:44 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"