Event does not fire

  • 1
  • Question
  • Updated 7 years ago
I wrote the following script in MM14 macro editor.But , when I added or modified any topic in a mindmap, nothing happened.
Is there anyone knows how to make this script work? thanks!

'#Language "WWB-COM"
'(Olympic Limited ) - Mark all topics complete
'Copyright ?013 Olympic Limited http://www.olympic-limited.co.uk. All rights reserved

Option Explicit

Dim d As Document
Dim t As Topic
Dim WithEvents e As Event
Dim mask As Long

Sub Main
If Documents.Count > 0 Then
Set d = ActiveDocument
If Not d Is Nothing Then
mask = mmEventFlagObjectAdded + mmEventFlagObjectModified + mmEventFlagDocumentSelectionChanged
Set e = Events.AddDocumentEvent(mask, True, True, d)
End If
End If
End Sub
Private Sub e_Fire(ByVal flag As Long, ByVal timing As MmEventTime, source As Object, extra As Variant)
MsgBox "something happened"
End Sub

Photo of Jimmy


  • 14 Posts
  • 0 Reply Likes

Posted 7 years ago

  • 1

Be the first to post a reply!