Created
January 29, 2018 02:39
-
-
Save TheKevinWang/917bbb7057dfe1e8632c10cc8aaf7b8a to your computer and use it in GitHub Desktop.
Class module for VBA decoy document. It should be named "oAppClass"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Public WithEvents oApp As Word.Application | |
Private Sub oApp_DocumentBeforeClose(ByVal Doc As Document, Cancel As Boolean) | |
Cancel = True | |
Application.Quit SaveChanges:=wdDoNotSaveChanges | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment