WarnBeforeSavingPrintingSendingMarkup Property

Microsoft Word Visual Basic

expression.WarnBeforeSavingPrintingSendingMarkup

expression    Required. An expression that returns a Options object.

Example

This example prints the active document but allows the user to abort if the document contains tracked changes or comments.

Sub SaferPrint
    Dim blnOldState as Boolean

    'Save old state in variable
    blnOldState = Application.Options.WarnBeforeSavingPrintingSendingMarkup

    'Turn on warning
    Application.Options.WarnBeforeSavingPrintingSendingMarkup = True

    'Print document
    ActiveDocument.PrintOut

    'Restore original warning state
    Application.Options.WarnBeforeSavingPrintingSendingMarkup = blnOldState

EndSub