Jay
Wed Jan 12 14:52:51 CST 2005
Joan wrote:
> 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
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ:
http://word.mvps.org