appointments

  • Thread starter Henrik Johansson
  • 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
 
S

Sue Mosher [MVP-Outlook]

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.
 
J

Johansson Henrik

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
 
J

Johansson 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top