Event Codes
Visio Automation Reference |
When you are working with the Add or AddAdvise method, use the following table to find the event code for the event you want to create. This table lists each Microsoft Office Visio event and its corresponding event code and numeric code.
Note |
---|
If you are using Microsoft Visual Basic or Visual Basic for Applications (VBA), you don't need to create your own events. See the event topic in this reference that corresponds to the event you want to use. |
Table of events and corresponding event and numeric codes
Event |
Event code |
Numeric code |
---|---|---|
visEvtApp+visEvtAfterModal |
&H1040 (4160) |
|
visEvtCodeAfterResume |
&H00D1 (209) |
|
visEvtCodeAfterResumeEvents |
&H00D5 (213) |
|
visEvtRemoveHiddenInformation |
&H000A (11) |
|
visEvtApp+visEvtAppActivate |
&H1001 (4097) |
|
visEvtApp+visEvtAppDeactivate |
&H1002 (4098) |
|
visEvtApp+visEvtObjActivate |
&H1004 (4100) |
|
visEvtApp+visEvtObjDeactivate |
&H1008 (4104) |
|
visEvtDel+visEvtDataRecordset |
&H4020 (16416) |
|
visEvtDel+visEvtDoc |
&H4002 (16386) |
|
visEvtCodeBefDocSave |
&H0007 (7) |
|
visEvtCodeBefDocSaveAs |
&H0008 (8) |
|
visEvtDel+visEvtMaster |
&H4008 (16392) |
|
visEvtApp+visEvtBeforeModal |
&H1020 (4128) |
|
visEvtDel+visEvtPage |
&H4010 (16400) |
|
visEvtApp+visEvtBeforeQuit |
&H1010 (4112) |
|
visEvtCodeBefSelDel |
&H0385 (901) |
|
visEvtDel+visEvtShape |
&H4040 (16448) |
|
visEvtCodeShapeBeforeTextEdit |
&H0323 (803) |
|
visEvtDel+visEvtStyle |
&H4004 (16388) |
|
visEvtCodeBeforeSuspend |
&H00D0(208) |
|
visEvtCodeBeforeSuspendEvents |
&H00D4 (212) |
|
visEvtDel+visEvtWindow |
&H4001 (16385) |
|
visEvtCodeBefWinPageTurn |
&H02BF (703) |
|
visEvtCodeBefWinSelDel |
&H02BE (702) |
|
visEvtMod+visEvtCell |
&H2800 (10240) |
|
visEvtAdd+visEvtConnect |
&H8100 (33024) |
|
visEvtDel+visEvtConnect |
&H4100 (16640) |
|
visEvtCodeCancelConvertToGroup |
&H038C (908) |
|
visEvtAdd+visEvtDataRecordset |
&H8020 (32800) |
|
visEvtMod+VisEvtDataRecordset |
&H2020 (8224) |
|
visEvtCodeDocDesign |
&H0006 (6) |
|
DocumentAdded |
visEvtAdd+visEvtDoc |
&H8002 (32770) |
visEvtMod+visEvtDoc |
&H2002 (8194) |
|
visEvtCodeCancelDocClose |
&H0010 (10) |
|
visEvtCodeDocCreate |
&H0001 (1) |
|
visEvtCodeDocOpen |
&H0002 (2) |
|
visEvtCodeDocSave |
&H0003 (3) |
|
visEvtCodeDocSaveAs |
&H0004 (4) |
|
visEvtCodeEnterScope |
&H00CA (202) |
|
visEvtCodeExitScope |
&H00CB (203) |
|
visEvtMod+visEvtFormula |
&H3000 (12288) |
|
visEvtCodeCancelSelGroup |
&H038E (910) |
|
visEvtCodeKeyDown |
&H02C8 (712) |
|
visEvtCodeKeyPress |
&H02C9 (713) |
|
visEvtCodeKeyUp |
&H02CA (714) |
|
visEvtAdd+visEvtMaster |
&H8008 (32776) |
|
visEvtApp+visEvtMarker |
&H1100 (4352) |
|
visEvtMod+visEvtMaster |
&H2008 (8200) |
|
visEvtCodeCancelMasterDel |
&H0191 (401) |
|
visEvtCodeMouseDown |
&H02C5 (709) |
|
visEvtCodeMouseMove |
&H02C6 (710) |
|
visEvtCodeMouseUp |
&H02C7 (711) |
|
visEvtCodeBefForcedFlush |
&H00C8 (200) |
|
visEvtCodeAfterForcedFlush |
&H00C9 (201) |
|
visEvtApp+visEvtNonePending |
&H1200 (4608) |
|
visEvtCodeWinOnAddonKeyMSG |
&H02C4 (708) |
|
visEvtAdd+visEvtPage |
&H8010 (32784) |
|
visEvtMod+visEvtPage |
&H2010 (8208) |
|
visEvtCodeCancelPageDel |
&H01F5 (501) |
|
visEvtCodeQueryCancelConvertToGroup |
&H038B (907) |
|
visEvtCodeQueryCancelDocClose |
&H0009 (9) |
|
visEvtCodeQueryCancelSelGroup |
&H038D (909) |
|
visEvtCodeQueryCancelMasterDel |
&H0190 (400) |
|
visEvtCodeQueryCancelPageDel |
&H01F4 (500) |
|
visEvtCodeQueryCancelQuit |
&H00CC (204) |
|
visEvtCodeQueryCancelSelDel |
&H0387 (903) |
|
visEvtCodeQueryCancelStyleDel |
&H012C (300) |
|
visEvtCodeQueryCancelSuspend |
&H00CE(206) |
|
visEvtCodeQueryCancelSuspendEvents |
&H0528 (210) |
|
visEvtCodeQueryCancelUngroup |
&H0389 (905) |
|
visEvtCodeQueryCancelWinClose |
&H02C2 (706) |
|
visEvtCodeCancelQuit |
&H00CD (205) |
|
visEvtCodeDocRunning |
&H0005 (5) |
|
visEvtCodeSelAdded |
&H0386 (902) |
|
visEvtCodeWinSelChange |
&H02BD (701) |
|
visEvtCodeCancelSelDel |
&H0388(904) |
|
visEvtAdd+visEvtShape |
&H8040 (32832) |
|
visEvtMod+visEvtShape |
&H2040 (8256) |
|
visEvtShapeDataGraphicChanged |
&H0327 (807) |
|
visEvtCodeShapeExitTextEdit |
&H0324 (804) |
|
visEvtShapeLinkAdded |
&H0325 (805) |
|
visEvtShapeLinkDeleted |
&H0326 (806) |
|
visEvtCodeShapeParentChange |
&H0322 (802) |
|
ShapesDeleted |
visEvtCodeShapeDelete |
&H0321 (801) |
visEvtAdd+visEvtStyle |
&H8004 (32772) |
|
visEvtMod+visEvtStyle |
&H2004 (8196) |
|
visEvtCodeCancelStyleDel |
&H012D (301) |
|
visEvtCodeCancelSuspend |
&H00CF(207) |
|
visEvtCodeCancelSuspendEvents |
&H00D3 (211) |
|
visEvtMod+visEvtText |
&H2080 (8320) |
|
visEvtCodeCancelUngroup |
&H038A (906) |
|
visEvtCodeViewChanged |
&H02C1 (705) |
|
visEvtApp+visEvtIdle |
&H1400 (5120) |
|
visEvtApp+visEvtWinActivate |
&H1080 (4224) |
|
visEvtCodeCancelWinClose |
&H02C3 (707) |
|
visEvtAdd+visEvtWindow |
&H8001 (32769) |
|
visEvtMod+visEvtWindow |
&H2001 (8193) |
|
visEvtCodeWinPageTurn |
&H02C0 (704) |