Skip to content

Instantly share code, notes, and snippets.

@TheKevinWang
Created January 29, 2018 02:39
Show Gist options
  • Save TheKevinWang/917bbb7057dfe1e8632c10cc8aaf7b8a to your computer and use it in GitHub Desktop.
Save TheKevinWang/917bbb7057dfe1e8632c10cc8aaf7b8a to your computer and use it in GitHub Desktop.
Class module for VBA decoy document. It should be named "oAppClass"
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