Outlook automation

G

Grimmie

I use VB6 to add/update an appointment in Outlook 2000

for adding there is no problem, but now I want to UPDATE an appointment, how
do I do this ?
I can only find documentation on how to CREATE a new appointment, but not
how to UPDATE an appointment.

Also I have a userproperty in: oAppointment.UserProperties("objectid") =
"105" (example)
Now I want to find the appointment that matches this userproperty. How do I
do this ? The "objectid" is a unique value.
 
K

Ken Slovak - [MVP - Outlook]

Once you have a handle to an existing item updating it is just a matter of
changing its various properties and then saving the item. For finding an
item with a unique property value you can use the Filter or Restrict methods
of a folder's Items collection. There are examples in the Help for the
Object Browser for all Outlook objects, methods, properties, events and
collections. Look there for examples of working with filters and
restrictions. Also, look over the code samples and information about Outlook
development at www.outlookcode.com
 
G

Grimmie

tnx, the posting of the upgrade method was a bit premature.
But the restrict method doesn't seem to work on the userproperties, I can
only use the standard properties of olAppointmentItem
 
K

Ken Slovak - [MVP - Outlook]

You can use a UserProperty in a restriction or filter but it has to be
defined in the folder and the item and not just in the item, and it has to
be initialized. Outlook user properties aren't added to items until they are
initialized in the item.
 
Top