Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

This is a final product off a few of my VBA Macro's added together for a project I was working on

Public WithEvents App As Word.Application
Private Sub App_DocumentBeforePrint(ByVal Doc As Document, Cancel As Boolean)
Dim bPrintBackgroud As Boolean

     bPrintBackgroud = Options.PrintBackground
     Options.PrintBackground = False
     Application.DisplayAlerts = wdAlertsNone   

Cancel = True
Call FilePrint

     Application.DisplayAlerts = wdAlertsAll
     Options.PrintBackground = bPrintBackgroud

	ActiveDocument.Saved = False
	If ActiveDocument.Saved = False Then ActiveDocument.Save

End Sub
  • No labels