Ken said:
I have created a number of templates with field codes embedded for
the users to plug in variable information. I would like to create
and display a help screen when the user opens the file instructing
the user how to fill out the document. Is it possible to do this? I
do not want the help information to print, however.
Thank you for your assistance.
There are several ways.
You can write a macro, stored in the template. If you name the macro
AutoNew, it will run whenever the File > New command is used to create a new
document (form) based on the template. If you name it AutoOpen, it will run
whenever one of those documents, or the template itself, is opened. You can
make two copies of the same code, one with each name, to handle both
actions. See
http://www.gmayor.com/installing_macro.htm and
http://www.word.mvps.org/FAQs/MacrosVBA/DocumentEvents.htm.
In the macro, you can display a message box if the instructions aren't very
long:
Sub AutoNew()
Dim msg As String
msg = "This is the first line of instructions."
msg = msg & vbCr & "This is the second line of instructions."
' as many lines as needed, not sure what max number is
MsgBox msg
End Sub
If the instructions are longer than a message box will hold, you could
create a userform
(
http://www.word.mvps.org/FAQs/Userforms/CreateAUserForm.htm) that contains
just a series of labels for the text, and an OK button to close it. The
AutoNew and AutoOpen macros then just call the userform's .Show command.
For instructions at specific spots in the form, you can use a recently
discovered trick: Insert an AutoTextList field with a field code written
like this:
{ AutoTextList "Displayed text" \s NoStyle \t "Your instruction text" }
The "Displayed text" part will show permanently in the document and will
print, so it could be the label next to a form field. The switch \s NoStyle
says the list should contain all AutoText entries formatted with a style
named NoStyle; but since there is no such style, the list is empty and won't
drop down. The switch \t "Your instruction text" causes the text inside the
quotes to be shown as a tooltip when the mouse hovers over the displayed
text. This will work even when the form is protected--you can't click on the
displayed text to select it, but the tooltip still shows.
--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.