appointments

  • Thread starter Thread starter Henrik Johansson
  • Start date Start date
H

Henrik Johansson

I'm trying to create an addin in outlook that will import the timetables
from our database system into outlook calendar.
The problem is that I cannot find a way to update records that has been
imported earlier.
Any ideas?
/Henrik
 
You didn't say much about your application, but the key piece you're missing
is probably some mechanism by which you can identifiy the records created
earlier. One approach would be to use a field (built-in or custom) on each
Outlook appointment to hold an ID number that would uniquely identify it as
related to a particular item in the database.
 
I created a extra field in the Calendar folder named BokNr
The import code contains the following code

Set appt = Outlook.Application.CreateItem(olAppointmentItem)
With appt
[add data to appointment]
.UserProperties("BokNr") = RS.Fields("boknr")
.Save
End With

(BokNr is the PrimKey in the DB)
But the BokNr field in the Calendar folder doesn't get any data.

/Henrik
 
The problem was that I had forgot to execute
appt.UserProperties.Add(...)
before setting the value
/Henrik

Johansson Henrik said:
I created a extra field in the Calendar folder named BokNr
The import code contains the following code

Set appt = Outlook.Application.CreateItem(olAppointmentItem)
With appt
[add data to appointment]
.UserProperties("BokNr") = RS.Fields("boknr")
.Save
End With

(BokNr is the PrimKey in the DB)
But the BokNr field in the Calendar folder doesn't get any data.

/Henrik

Sue Mosher said:
You didn't say much about your application, but the key piece you're missing
is probably some mechanism by which you can identifiy the records created
earlier. One approach would be to use a field (built-in or custom) on each
Outlook appointment to hold an ID number that would uniquely identify it as
related to a particular item in the database.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top