create appointment for current folder

  • Thread starter Thread starter Thelen
  • Start date Start date
T

Thelen

Situation Exchange env.. Current folder is a calendar folder of another
user (USER2), where USER1 has the rights to create/modify etc. a appointment
in this folder.

When USER1 creates a new appointmnt by pressing Ctrl+N and then saves it, it
will be saved in the calendar of USER2 because this is the current folder.

I try to create a new appointment by script (and modify start date), but
when the USER1 later saves this appointment, it will be saved in USER1's
calendar and not in the current folder!
This is my code (myOO is the application object)

sub CreateNewAppm(X)
Dim MyAppm
....
Set MyAppm = myOO.CreateItem(olAppointmentItem)
....
MyAppm.Display
end sub

How can I solve this problem?

Thanks
J. Thelen
 
To create a new instance of an item in a particular folder, use the Add method on the target folder's Items collection.
 
Hello Sue Mosher,

Set MyAppm =
MyOO.ActiveExplorer.CurrentFolder.Items.Add(olAppointmentItem)

works. Thanks a lot.
J. Thelen


To create a new instance of an item in a particular folder, use the Add
method on the target folder's Items collection.
 
Hello Sue Mosher,

I wrote
Set MyAppm =
MyOO.ActiveExplorer.CurrentFolder.Items.Add(olAppointmentItem)
works.

but it does not work with Outlook 2000. How can I create a new appointment
there?

J. Thelen



To create a new instance of an item in a particular folder, use the Add
method on the target folder's Items collection.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
What in particular doesn't work? What's the code context? In other words, are you writing a COM add-in, an external application, a script?

You can use the Namespace.GetSharedDefaultFolder to return another user's Calendar folder.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top