Making template instructions disappear when user enters input

J

Joan

Is there a way to make lengthy instructions (sometimes several paragraphs)
automatically disappear from a template when a user enters input?

I tried the MacroButton NoMacro field, but that is limited to instructions
that are no longer than one line. This template details the information that
should appear in each section, but the instructions remain unless the author
remembers to delete them (sigh).

Thanks for your help.
 
J

Jay Freedman

Joan said:
Is there a way to make lengthy instructions (sometimes several
paragraphs) automatically disappear from a template when a user
enters input?

I tried the MacroButton NoMacro field, but that is limited to
instructions that are no longer than one line. This template details
the information that should appear in each section, but the
instructions remain unless the author remembers to delete them (sigh).

Thanks for your help.

Hi Joan,

One possibility would be a group of macros that intercept the various print
and save commands (see
http://word.mvps.org/FAQs/MacrosVBA/InterceptSavePrint.htm). Each macro
would delete the contents of a bookmark that you place around the
instructions in the template, and then perform the command's action. For
example,

Public Sub FilePrintDefault()
If ActiveDocument.Bookmarks.Exists("Instruct") Then
ActiveDocument.Bookmarks("Instruct").Range.Delete
End If

ActiveDocument.PrintOut Background:=False
End Sub

Public Sub FilePrint()
If ActiveDocument.Bookmarks.Exists("Instruct") Then
ActiveDocument.Bookmarks("Instruct").Range.Delete
End If

Dialogs(wdDialogFilePrint).Show
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top