Auto Run a macro or sub on task open

  • Thread starter Thread starter LWD3
  • Start date Start date
L

LWD3

I have the following sub that works off a button from the tool bar.

Public Sub subInsertDate()
Dim itm As Object
Dim strNote As String
On Error Resume Next

Set itm = Application.ActiveInspector.CurrentItem

If Not itm Is Nothing Then
strNote = itm.Body
itm.Body = Date & " - " & vbCrLf & strNote
End If

Set itm = Nothing

End Sub

How do I get this to auto execute when I open a specific task?
 
Back
Top