A
Andrew Cushen
Hi all-
I am encountering some odd behavior in Automating
Outlook 2000 from my VB 6 app. I am using a Restrict
criteria to pull all appointments belonging to a certain
Category into a collection. That works fine.
But when I try to *change* the Location property of a
single Appointment programmatically, something weird
happens: if I look at the appointment in the Calendar view
(week, month, whatever), the change appears not to have
occurred. However, if I Open the appt. by double-clicking
on it, my new Location value is there! But then, when I
close the appt., I am prompted to Save Changes. If I Save
Changes, then my new Location value is now visible in
Calendar view. However, if I don't save changes, my new
Location value is lost. What's going on here? This
functionality is vital to my app, and I obviously can't
require my users to open & save every appoitnment my app
processes! Do I need to somehow programmatically "save"
the appt. after I change the Location field?
Here is the code I use to change the location:
----code start----
myRestrictItems.Item(i).Location = strCustNameChosen
----code stop----
where "strCustNameChosen" is a string containing the new
Location value I want to put in, and "i" is an Integer
representing the appoitnment's location in the collection.
Any help will be appreciated!
Thanks,
-Andrew
I am encountering some odd behavior in Automating
Outlook 2000 from my VB 6 app. I am using a Restrict
criteria to pull all appointments belonging to a certain
Category into a collection. That works fine.
But when I try to *change* the Location property of a
single Appointment programmatically, something weird
happens: if I look at the appointment in the Calendar view
(week, month, whatever), the change appears not to have
occurred. However, if I Open the appt. by double-clicking
on it, my new Location value is there! But then, when I
close the appt., I am prompted to Save Changes. If I Save
Changes, then my new Location value is now visible in
Calendar view. However, if I don't save changes, my new
Location value is lost. What's going on here? This
functionality is vital to my app, and I obviously can't
require my users to open & save every appoitnment my app
processes! Do I need to somehow programmatically "save"
the appt. after I change the Location field?
Here is the code I use to change the location:
----code start----
myRestrictItems.Item(i).Location = strCustNameChosen
----code stop----
where "strCustNameChosen" is a string containing the new
Location value I want to put in, and "i" is an Integer
representing the appoitnment's location in the collection.
Any help will be appreciated!
Thanks,
-Andrew