How to record macros in Outlook2007?

B

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.
 
M

Michael Bauer [MVP - Outlook]

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 "(e-mail address removed)"
End If
End Sub


--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top