How do you set a document to only print after it is saved first?

G

Guest

I have set up templates with file name and path in footers but if it is
printed before it is saved then the footer simply says "Document 1"

What properties do i need to set to make sure the file is saved before
printing?

Thanks
 
J

Jay Freedman

I have set up templates with file name and path in footers but if it is
printed before it is saved then the footer simply says "Document 1"

What properties do i need to set to make sure the file is saved before
printing?

Thanks

There is no property or option to do that. You need two macros in your
template to intercept the File > Print command and the toolbar button,
and display the save dialog if necessary:

Public Sub FilePrint()
If ActiveDocument.Path = "" Then
Dialogs(wdDialogFileSaveAs).Show
End If
Dialogs(wdDialogFilePrint).Show
End Sub

Public Sub FilePrintDefault()
If ActiveDocument.Path = "" Then
Dialogs(wdDialogFileSaveAs).Show
End If
ActiveDocument.PrintOut Background:=False
End Sub

Also make sure the "Update fields" option is checked in Tools >
Options > Print.
 

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