Skip to content

Instantly share code, notes, and snippets.

@TheKevinWang
Created January 29, 2018 02:04
Show Gist options
  • Save TheKevinWang/07051cfae574af4c4a5f777d479c34e5 to your computer and use it in GitHub Desktop.
Save TheKevinWang/07051cfae574af4c4a5f777d479c34e5 to your computer and use it in GitHub Desktop.
Main module for VBA decoy document.
Option Explicit
Dim oAppClass As New oAppClass
Public Sub AutoOpen()
ActiveDocument.Sections(1).Range.Font.Hidden = False
Set page1 = Selection.GoTo(What:=1, Which:=2, Name:=1).Bookmarks("\Page").Range
page1.Delete
Set oAppClass.oApp = Word.Application
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment