Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-27-2014, 01:43 PM
jdcornelius jdcornelius is offline Help: how to replace hidden text with unhidden text when typing over Windows XP Help: how to replace hidden text with unhidden text when typing over Office 2007
Novice
Help: how to replace hidden text with unhidden text when typing over
 
Join Date: Mar 2014
Posts: 2
jdcornelius is on a distinguished road
Default Help: how to replace hidden text with unhidden text when typing over

I'm trying to create a mailing label template for our department that has all the cells/fields for the labels ready to click and replace the name/address info but for the unused fields to remain hidden (when printing) so as not to accidentally waste a label sheet. Well, I've taken care of the hidden part, but I can't figure out how to make it so that when you click and start typing, the new info input is no longer hidden text... Is this even possible?

In case it helps, I have attached the template document in question...

Thanks for any help!
Attached Files
File Type: docx Mailing Labels.docx (19.5 KB, 3 views)
Reply With Quote
  #2  
Old 03-27-2014, 04:23 PM
macropod's Avatar
macropod macropod is offline Help: how to replace hidden text with unhidden text when typing over Windows 7 32bit Help: how to replace hidden text with unhidden text when typing over Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,433
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

The first macrobutton field in the first cell has a macro reference named 'DoFieldClick'. Change this to 'Unhide' and copy that field to all the other cells. Then add the following macro to the document's 'ThisDocument' code module:
Code:
Sub Unhide()
With Selection.Cells(1).Range
  .Font.Hidden = False
  .Fields(1).Code.Text = Replace(.Fields(1).Code.Text, "UnHide", "NoMacro")
End With
End Sub
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 03-27-2014, 06:46 PM
Charles Kenyon Charles Kenyon is offline Help: how to replace hidden text with unhidden text when typing over Windows 7 64bit Help: how to replace hidden text with unhidden text when typing over Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 6,594
Charles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to behold
Default

I am a great fan of MacroButton Field prompts. I even wrote an Add-In to let you insert them painlessly. MacroButton Prompt Add-In However, they are sort of useless when you can't see them. You can still use F11 to move from field to field, but that isn't exactly intuitive either. Will this be used by people with versions of Word before Word 2007? If not, I would suggest Content Controls instead.

If it will be used by people with Word 2003 or earlier, you could mark the prompt as hidden without marking the entire field as hidden. Take a look at my Add-In. It is set so that the prompt is in a colored text but what is typed is in the style of the surrounding text.

I suppose if the people typing have display of hidden text turned on it makes sense with it not being printed. That would work.

I will be attaching a version with both content controls and macrobutton fields in a couple of seconds. In both instances in Word 2007 and later, the tab key will take you to the next place to type.
Reply With Quote
  #4  
Old 03-27-2014, 07:13 PM
Charles Kenyon Charles Kenyon is offline Help: how to replace hidden text with unhidden text when typing over Windows 7 64bit Help: how to replace hidden text with unhidden text when typing over Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 6,594
Charles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to behold
Default

Here is a screenshot and the sample document. Look first at the screenshot. The document is set to show hidden, non-printing characters, including hidden text. In print preview the only thing that would show up would be the first macrobutton prompt.

This document is protected from any editing except that typing/editing is allowed for everyone in certain areas. In this case, in the content controls and in the MacroButton Field Prompts.

The first two rows of labels use Content Controls. Unless something is typed in them, nothing will print. The prompt shows up when the content control is activated (clicked in). If someone tries to type elsewhere, they will not be allowed to do so and the Restrict Formatting and Editing pane will show up. In this case, I have the option checked to highlight next area for typing.

The next row has three MacroButton Field prompts. The first one is not hidden, the next two are hidden (but with hidden text being displayed). Note that the Content Control was able to have a longer prompt than was the MacroButton field! When the document has editing restricted this way, the tab key moves to the next place the user can type rather than to the next cell. Again this type of protection is not available in earlier versions of Word.

Note that the macrobutton prompts are in bold blue text. When someone types in them, the text will be whatever style and color is in use in the table cell, not the bold blue text. That formatting is applied only to the prompt part of the field. The second two fields also have the font formatting of hidden applied only to the prompt. Thus when someone types in them, the typed text is not hidden. I developed that Add-In just so I could easily have the prompts stand out but not stand out after they had been used; it does this automatically and even gives a choice of colors. (It doesn't do hidden text though.)

See my next post for some design considerations.
Attached Images
File Type: png 2010ContentControls&MacroButtonFieldPrompts.png (44.5 KB, 18 views)
Attached Files
File Type: docx deleteme Mailing Labels.docx (28.5 KB, 1 views)

Last edited by Charles Kenyon; 03-27-2014 at 07:47 PM. Reason: Add explanatory text
Reply With Quote
  #5  
Old 03-27-2014, 07:41 PM
Charles Kenyon Charles Kenyon is offline Help: how to replace hidden text with unhidden text when typing over Windows 7 64bit Help: how to replace hidden text with unhidden text when typing over Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 6,594
Charles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to behold
Default

Design considerations:

Use a template - a Word Template
"Template" is a term of art in Word. It means, for the most part, a special kind of document that no one is supposed to type in. It is a holder of formatting, styles, and boilerplate text. If the user double clicks on it, it does not open. Instead a new document is created, holding all of the text and formatting of the template and having any customizations from the templates. It makes it more difficult for someone to mess up your form by mistake. Templates in Microsoft Word

One field per label.
If I were doing a mail merge, I would definitely use all of the different fields in each label, possibly even more. However when it is being typed each time, one field per label is sufficient. It would be annoying, at least to me, to have to move to a different field a bunch of times within one label.

Three Columns, not Five
Consider modifying the layout to eliminate the separator columns. They are put there automatically, but they are unnecessary and in an unprotected format they interefere because a tab will stop in one of those separator columns even though you don't want anyone typing there. Instead have three columns with the indents for the columns where they currently are on the page. It is the indents, rather than the column boundaries that hold your text in place. Again, for mail merge I would not care about the extra columns.

Use of the Classic File New Dialog encourages use of custom templates because it makes using them easier
It makes it easier to find them when they are stored in the User Templates folder or the shared Workgroup Templates folder. It also makes it harder to open a template by mistake. It is fairly simple to make this dialog the easiest way to start a new document avoiding Microsoft's online templates that are not designed for your business. 2007 Add to QAT - File New Variations in the Versions of Word

Hope this helps.
Reply With Quote
  #6  
Old 03-27-2014, 08:25 PM
Charles Kenyon Charles Kenyon is offline Help: how to replace hidden text with unhidden text when typing over Windows 7 64bit Help: how to replace hidden text with unhidden text when typing over Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 6,594
Charles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to behold
Default

Here is another variation on the document. I may turn it into a tutorial.
Attached Files
File Type: docx ContentControlMBFieldProtectedDocExample.docx (30.1 KB, 1 views)
Reply With Quote
  #7  
Old 03-28-2014, 01:19 PM
jdcornelius jdcornelius is offline Help: how to replace hidden text with unhidden text when typing over Windows XP Help: how to replace hidden text with unhidden text when typing over Office 2007
Novice
Help: how to replace hidden text with unhidden text when typing over
 
Join Date: Mar 2014
Posts: 2
jdcornelius is on a distinguished road
Smile Thanks

Thank you both for your help and suggestions, I've got a basic but working document .
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help: how to replace hidden text with unhidden text when typing over Macro to find text and replace with form field containing that text iiiiifffff Word VBA 16 06-04-2016 01:47 AM
Help: how to replace hidden text with unhidden text when typing over Hidden style applied over already-hidden text. christie Word 1 08-17-2011 09:10 AM
Help: how to replace hidden text with unhidden text when typing over Typing into text boxes Misha Word 1 07-04-2011 08:08 PM
Deleting text while typing in Word cajun62234 Word 1 04-07-2011 04:40 PM
Help: how to replace hidden text with unhidden text when typing over Word is typing random text fiddle1 Word 1 11-30-2008 10:29 AM

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 10:28 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft