Creating disappearing text in a word doc.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am attempting to create my own "template" for a word document that will be
used by others. I want to insert text, that when the user clicks on it it
will disappear and allow them to add new text.
If anyone knows how this is done , I would sincerely appreciate the help,
please.
I previously posted this in the templates page and got no answer . . .
I know this is possible - but I can't find how to do it myself.
 
I am attempting to create my own "template" for a word document that will be
used by others. I want to insert text, that when the user clicks on it it
will disappear and allow them to add new text.
If anyone knows how this is done , I would sincerely appreciate the help,
please.
I previously posted this in the templates page and got no answer . . .
I know this is possible - but I can't find how to do it myself.

Try a macrobutton field constructed something like:

{ Macrobutton NoMacro "Click and type"}

Use CTRL+F9 to enter the field braces, select, right click and toggle
field codes.
 
Greg Maxey said:
Try a macrobutton field constructed something like:

{ Macrobutton NoMacro "Click and type"}

Use CTRL+F9 to enter the field braces, select, right click and toggle
field codes.

This is close, but not exactly what I'm looking for. In this macrobutton,
the text disappears when you start to type, not when you click into the
region. However, I can make this work if there's not something else.

Thanks, Greg ... that was some awesome turnaround!
 
Thanks everyone for your assistance. This was almost exactly what I was
looking for. When it worked I did a little dance! (Yes, I am easily amused!
: ) )
Have a wonderful weekend! Thanks also for the quick response!
 
This is close, but not exactly what I'm looking for. In this macrobutton,
the text disappears when you start to type, not when you click into the
region. However, I can make this work if there's not something else.

Thanks, Greg ... that was some awesome turnaround!- Hide quoted text -

- Show quoted text -

Chuck,

I didn't read your question very well. You can do that using
application events.

See: http://word.mvps.org/faqs/macrosvba/AppClassEvents.htm

Relax, it looks daunting but really not that hard.

Bookmark the text you want deleted automatically when clicked. Lets
call the bookmark name "DeleteMe"

Put this code in the "Windows Select Change" event:

If Selection.InRange(ActiveDocument.Bookmarks("DeleteME").Range) Then
ActiveDocument.Bookmarks("DeleteMe").Range.Delete
End If
 
Greg,
I'm using the {Macrobutton NoMacro ...} but having problems.
1) In the .DOT, I toggle all field codes to hide the {Macrobutton NoMacro
and this works
2) If I close the .DOT, when reopened, all the Macrobutton fields are
visible (field codes are NOT toggled).
3) worse, if I create a .DOC from the .DOT, all the {Macrobutton NoMacro
field codes show up/are visible!

Yikes, is this a bug? Should not the Macrobutton fields be not visible in a
..DOC created from the .DOT?
 
Greg Maxey said:
Chuck,

I didn't read your question very well. You can do that using
application events.

See: http://word.mvps.org/faqs/macrosvba/AppClassEvents.htm

Relax, it looks daunting but really not that hard.

Bookmark the text you want deleted automatically when clicked. Lets
call the bookmark name "DeleteMe"

Put this code in the "Windows Select Change" event:

If Selection.InRange(ActiveDocument.Bookmarks("DeleteME").Range) Then
ActiveDocument.Bookmarks("DeleteMe").Range.Delete
End If
Greg, I'm assuming you meant the WindowSelectionChange event.

I'm not getting the text to disappear. The bookmark is in the .DOT, and I
followed the linked instructions. I'll go back. I imagine folks have some way
to debug/trace these things to see where the code is going awry?
thanks Greg!
 
Sigh. If you've read this far, here's what I found ...
In Word, you can choose Tools > Options and select the View tab. Under the
"Show" section, you can unclick "Field Codes".

Once you do this, .DOCs created from your .DOT do not present the field
codes, and click and enter work as advertised.
 
A quicker way to show/hide field codes is to press Alt+F9.

--
Stefan Blom
Microsoft Word MVP


in message
 
Back
Top