VBA/Excel/Access/Word/Outlook/Outlook Calendar — различия между версиями

Материал из VB Эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Текущая версия на 12:47, 26 мая 2010

Creating a New Calendar Item

 
Sub app()
    Dim myAppointment As AppointmentItem
    Set myAppointment = Application.CreateItem(ItemType:=olAppointmentItem)
End Sub



Working with the Contents of a Calendar Item

 
Property 
Sub appopint()
    Dim myAppointment As AppointmentItem
    Set myAppointment = Application.CreateItem(ItemType:=olAppointmentItem)
    With myAppointment
        .Subject = "your email"
        .Body = "body."
        .Start = Str(Date + 7) & " 2.30 PM"
        .End = Str(Date + 7) & " 3.30 PM"
        .BusyStatus = olBusy
        .Categories = "Personal"
        .ReminderMinutesBeforeStart = 30
        .ReminderSet = True
        .Save
    End With
End Sub