writing appointment

paul j

Member
Licensed User
Tried to write an appointment into both PPC-outlook aswell Desktop-outlook.
Used the example code and added the newes DLL's to the project. Can't findback the results in outlook. There are no error-messages. What can be wrong:confused:
 
Last edited:

paul j

Member
Licensed User
i started with:
Appointment.new1
Appointment.Subject = aSubject
Appointment.Start = DateParse("10/25/2007") + (TimeParse("13:35") Mod cTicksPerDay)
PimCollection.AddItem(appointment.New1)

now i have the code, stille without results
Appointment.new1
PimCollection.New1("Appointments")
Appointment.New1
Appointment.Subject = aSubject
Appointment.AllDayEvent = true
Appointment.Start = DateParse(aDate)
PimCollection.AddItem(appointment.New1)
 

paul j

Member
Licensed User
Hi Erel,

I Already found the change you mentioned, but stil without resuls. I looked into the watch and found for the date(appointment.start.value) = 01/01/0001. I don't think I want an appointment in this year. Value for appointment.Subject = 0

all this with the code :

adate = "02/17/2007"
aSubject = "test"

Appointment.new1
Appointment.CreateNew
Appointment.Subject = aSubject
Appointment.AllDayEvent = true
Appointment.Start = DateParse(aDate)
PimCollection.New1("Appointments")
PimCollection.AddItem(appointment.value)
 

paul j

Member
Licensed User
Hi Erl,
I think I have to experiment with the dateformat. Normaly in the Netherlands we use dd-mm-yyyy. In the debugger yhe dateparse gives back a 0(zero) withe the format mm/dd/yyyy is returns a proper count of ticks

Sub Globals
DateFormat("dd-mm-yyyyy")
End Sub

Sub App_Start
frmMain.show

End Sub


Sub GetDate
Dim Date, subject

NewDate ="17/10/2007"
subject = "test"

AddAppointment(NewDate,subject)

End Sub

Sub AddAppointment(aDate, aSubject)
'pre aDate and aSubject have correct values
'post event has been added into the calender

Appointment.new1
Appointment.CreateNew
Appointment.Subject = aSubject
Appointment.AllDayEvent = true
Appointment.Start = DateParse(aDate)
PimCollection.New1("Appointments")
PimCollection.AddItem(appointment.value)
Msgbox(PimCollection.Count)

End Sub
 
Last edited:

paul j

Member
Licensed User
Hi Erel,

it seems the Outlook objects doesn't accept te parameters. I tried several formats/system settings on mu Desktop and formatsettings in the code, but with the debugger the content of Appointment.start is always 01/01/0001 or 0 (zero) depending of the used formats and the PimAppointment.count is always 0 (zero). Scubaticus (another Dutch-user) and I have simulair problems with the system-settings and b4ppc combination.
 
Top