View Single Post
  #7  
Old February 2nd 06, 09:49 AM posted to microsoft.public.outlook.program_vba
dim4x4
external usenet poster
 
Posts: 17
Default Creating new appointment & setting its properties

Guys, sorry can't figure it out. Could you please help a bit more?

PROBLEM 1:

This is my macro, but it doesn't do anything

Public Sub AddAppointment()

Dim objApp As Outlook.Application
Dim objAppointment As Outlook.AppointmentItem
Dim datStart As Date

datStart = Application.ActiveExplorer.Selection.Item(1).Start

Set objApp = New Outlook.Application
Set objAppointment = objApp.CreateItem(ItemType:=olAppointmentItem)

With objAppointment
.Subject = "Call "
.Start = datStart
.Duration = 5
.ReminderMinutesBeforeStart = 0
.Subject = "Call "
.Save
.Display
End With

End Sub


PROBLEM 2:

Maybe when I was editing the macros I've put something on the wrong
line, but it breaks in macro Private Sub SetPositionInternal
on the line EnumChildWindows hwnd, AddressOf EnumWindowProc, 0 giving
error
Compile error:
Invalid use of AddressOf operator

Any ideas? Thank you!

Ads