DocumentBeforePrint Event Example

This example prompts the user for a yes or no response before printing any document.

Private Sub App_DocumentBeforePrint _
        (ByVal Doc As Document, _
        Cancel As Boolean)
    a = MsgBox("Have you checked the " _
        & "printer for letterhead?", _
        vbYesNo)
    If a = vbNo Then Cancel = True
End Sub