TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Subject:Re: How to create a macro to modify printing? From:Beth Friedman <bjf -at- WAVEFRONT -dot- COM> Date:Thu, 1 Oct 1998 09:48:46 -0500
In our previous episode, Mark Magennis said:
>
> I want to make sure fields are not updated when my Word97 document is
> printed.
>
> My plan is to write a macro that intercepts the normal print command
> and sets UpdateFieldsAtPrint to False before opening the print dialog.
>
> I have written the following, but "ActiveDocument.PrintOut" just
> prints one copy of the document, rather than opening the Print dialog.
> Also, I don't know what to call the macro so that it gets run instead
> of the normal print command.
>
> Sub PrintFile()
> Options.UpdateFieldsAtPrint = False
> ActiveDocument.PrintOut
> End Sub
>
> Can anyone help me with this? I've never written in WordBasic.
Minor nit: this isn't WordBasic, it's VBA. If it were WordBasic, I
could help you, but I haven't been able to find sufficient resources
to transfer my knowledge of WordBasic to VBA. With WordBasic, to get
the document to print instead of the normal print command, you gave
the macro the same name as the command (FilePrint). Dunno if that'll
help.
Also -- why do you need a macro for this? Under Tools|Options|Print,
there's a checkbox to prevent updating of fields at print time.