Outlook 2007 VBA

Joined
Nov 22, 2008
Messages
2
Reaction score
0
I’m interested in taking a meeting request (Outlook 2007 SP2) that is sent to me and modifying the Category as well as modifying the item from Busy to Free. I wrote some code that can do that very thing, but I have to first accept the meeting request, go find the meeting in the calendar, double click it and then, with that item in focus, I can run the script below.

Is there any way I can modify this so instead of clicking the “Accept” button from the original meeting request, I could click a button to run some code that would accept the meeting, find the meeting and make the modifications?

Any help appreciated.


Sub ModifyAppt()
On Error GoTo Err_ModifyAppt

Dim myOlApp As New Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim myInbox As Outlook.MAPIFolder
Dim myDestFolder As Outlook.MAPIFolder
Dim myItems As Outlook.Items
Dim myItem As Object
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myInbox = myNameSpace.GetDefaultFolder(olFolderInbox)
Set myItems = myInbox.Items
Set myItem = Application.ActiveInspector.CurrentItem

myItem.ReminderSet = False
myItem.Categories = "Personal"
myItem.BusyStatus = 0
myItem.Save

Dim SaveMode As OlInspectorClose
myItem.Close (SaveMode)

Exit_ModifyAppt:
Exit Sub
Err_ModifyAppt:
MsgBox "sub ModifyAppt " & Err.Description
Resume Exit_ModifyAppt
End Sub
 
Joined
Nov 22, 2008
Messages
2
Reaction score
0
Looks like there wasn't a lot of interest and/or opinion on this issue. If I find anything out, I'll post it. If you have any ideas, let me know.
 

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