Question : Outlook VBA macro - Set appointment item to "show time as tentative"

Help please -
I need an Outlook (2007) VBA macro - Set appointment item to "show time as tentative"
When I am in the "explorer view " of my calendar I would like to click a macro whih will set the selected item(s) to "tentative"

Thanks!
Jim

Answer : Outlook VBA macro - Set appointment item to "show time as tentative"

Hello !

Assign "MakeTentative" to a new button and test if this does the trick.

I did not test it but I'm pretty sure it will work. Just for caution, create a new calendar and test there before testing in your real calendar.

If it does not work, write back with the error and line number.

I can only test it on Monday, if you don't mind waiting.

Syldra
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
Sub MakeTentative()

Dim objItem As Object

Set objItem = GetCurrentItem()

If Not TypeOf objItem Is AppointmentItem Then
    MsgBox ("Not an appointment")
    Exit Sub
End If

Set objItem.BusyStatus = 1
objItem.Save

End Sub

Function GetCurrentItem() As Object
Dim objApp As Outlook.Application
Set objApp = Application
On Error Resume Next
Select Case TypeName(objApp.ActiveWindow)
    Case "Explorer"
        Set GetCurrentItem = objApp.ActiveExplorer.Selection.Item(1)
    Case "Inspector"
        Set GetCurrentItem = objApp.ActiveInspector.CurrentItem
    Case Else
End Select
End Function
Random Solutions  
 
programming4us programming4us