Hi Everyone,
I'm new to this site and VBA in Outlook and so apologies if what I've done is totally wrong. I'd like to go through a number of selected appointments and change the 'Alldayevent' attribute of each appointment from say false to true. My code seems to work (by looking at the debug.print info) but when you look at the actual appoinment in the normal outlook window which was selected it doesn't seem to have changed.
The issue I suspect is something rather simple but I'm new to this and so hope someone can help.
Many thanks in advance
Rodp
using Outlook 2000, WinXP SP2
I'm new to this site and VBA in Outlook and so apologies if what I've done is totally wrong. I'd like to go through a number of selected appointments and change the 'Alldayevent' attribute of each appointment from say false to true. My code seems to work (by looking at the debug.print info) but when you look at the actual appoinment in the normal outlook window which was selected it doesn't seem to have changed.
The issue I suspect is something rather simple but I'm new to this and so hope someone can help.
Many thanks in advance
Rodp
using Outlook 2000, WinXP SP2
Code:
Sub ChangeAppointmentItem()
Dim objNS As Outlook.NameSpace
Dim objAppt As Outlook.AppointmentItem
Dim objCopiedAppt As Outlook.AppointmentItem
If ActiveExplorer.Selection.Count = 0 Then Exit Sub
Set objNS = Application.GetNamespace("MAPI")
For Each objAppt In ActiveExplorer.Selection
Debug.Print objAppt.Subject & " " & Format(objAppt.Start, "dd/mm/yy hh:mm") & ", " & objAppt.AllDayEvent
Debug.Print objAppt.AllDayEvent
objAppt.AllDayEvent = True
Debug.Print objAppt.AllDayEvent
Next
Set objAppt = Nothing
Set objCopiedAppt = Nothing
Set objNS = Nothing
End Sub