Solved

How do you hide the content control placeholder text when printing?

Posted on 2011-09-28
5
3,668 Views
Last Modified: 2013-11-10
I'm creating templates using content controls and I would like to have the placeholder text not print.

What I don't understand is that the placeholder text uses a built in style 'Placeholder Text (Always Hidden)' using a style Hidden. But what does Hidden actually do? It doesn't hide when printing and it only shows the text as greyed out.

I did see a possible solution of setting the placeholder text font to hidden but that would mean that the users Word settings would require that hidden text be displayed which I don't want.

Is there a way to do this?

Thanks
0
Comment
Question by:Sidcom
  • 3
5 Comments
 
LVL 21

Accepted Solution

by:
EricFletcher earned 500 total points
ID: 36948769
The "Hidden" in the style definition means that the style name is hidden in lists unless you explicitly change the setting.

As you note, changing the style's definition to Font=Hidden would do what you want but would force users to have the hidden text displayed to see it. You could also use Font color=White to make the text disappear -- but of course that would make it even more invisible for users.

One possible way to overcome that could be to alter the Print command (via VBA) for the document so that it redefines the style, then brings up the print dialog, then resets the style back to the standard settings.
0
 

Author Comment

by:Sidcom
ID: 36959506
Thanks,

I'll just have to do that then. One thing I was thinking was to just add a space into the text value before printing then clear it after (where content controls currently have no text).

Odd that this hasn't been thought through by MS...
0
 
LVL 21

Expert Comment

by:EricFletcher
ID: 36959525
Yes, I agree. Too bad there isn't a way to automatically designate specific styles for "don't print". I use character styles for answers for quizzes so I can set them as hidden text for students, but left as printable text for a teacher version.
0
 

Expert Comment

by:WhiteLeave
ID: 37767862
Keep in mind, that there is no possibility to override the PrintCommand in Word 2010. This possiblity ended with Word 2007. -> used to be FilePrint.
Thank you Microsoft!
0
 
LVL 21

Expert Comment

by:EricFletcher
ID: 37792515
Seriously? I don't have access to Word right now (iPhone) but I would want to test that. If true, it would mean that many VBA procedures already written would stop working.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now