How to record macros in Outlook2007?

  • Thread starter YmpzNzM
  • Start date Views 5,031
Status
Not open for further replies.
Y

YmpzNzM

Looking for the code to automatically assign an addressee when creating a new

calendar item. "Record macro" has been my crutch, but Outlook2007 does not

seem to have "record" button.
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
There's no recorder in Outlook. See this example:

Private WithEvents Inspectors As Outlook.Inspectors

Private Sub Application_Startup()

Set Inspectors = Application.Inspectors

End Sub

Private Sub Inspectors_NewInspector(ByVal Inspector As Inspector)

Dim obj As Object

Dim Appt As Outlook.AppointmentItem

Set obj = Inspector.CurrentItem

If TypeOf obj Is Outlook.AppointmentItem Then

Set Appt = obj

Appt.MeetingStatus = olMeeting

Appt.Recipients.Add "abc@domain.com"

End If

End Sub

Best regards

Michael Bauer

Am Mon, 6 Apr 2009 14:18:01 -0700 schrieb bjs73:


> Looking for the code to automatically assign an addressee when creating a


new
> calendar item. "Record macro" has been my crutch, but Outlook2007 does


not
> seem to have "record" button.
 
Status
Not open for further replies.
Top