Group:  Microsoft Outlook ยป microsoft.public.outlook.program_forms
Thread: 'Run a script' to open Current Calendar item

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

'Run a script' to open Current Calendar item
Henry 10.07.2006 15:29:02
I have a rule to move calendar item to a subfolder within mailbox. Due to
this the snipper doesnt post item as tentative.

I'm looking for a script to attach to calendar rule either to post tentative
or mark the item as open so it would post tentative.

I selected a RULE for all incoming meeting appointments and enabled 'run a
script'.

Below is what is shown in my script.

Sub CustomMeetingRequestRule(Item As Outlook.MeetingItem)
Rem Outlook.Add (olAppointmentItem)
Open(Outlook.Inspectors.Item.CurrentItem)
End Sub

Either
Outlook.Add (olAppointmentItem) OR
Open(Outlook.Inspectors.Item.CurrentItem)
is working.

Can anyone give me the right syntax for opening current appt item.

Re: 'Run a script' to open Current Calendar item
"Sue Mosher [MVP-Outlook]" <suemvp[ at ]outlookcode.com> 19.07.2006 21:29:17
It should be something like (untested):

Set appt = Item.GetAssociatedAppointment(AddToCalendar:=True)
appt.BusyStatus = olTentative
appt.Save

If you want to "open" the meeting request, the proper method is Display:

Item.Display
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Henry" <Henry[ at ]discussions.microsoft.com> wrote in message news:61F1122C-D7B8-4C1B-9E70-46176C018EBA[ at ]microsoft.com...
[Quoted Text]
>I have a rule to move calendar item to a subfolder within mailbox. Due to
> this the snipper doesnt post item as tentative.
>
> I'm looking for a script to attach to calendar rule either to post tentative
> or mark the item as open so it would post tentative.
>
> I selected a RULE for all incoming meeting appointments and enabled 'run a
> script'.
>
> Below is what is shown in my script.
>
> Sub CustomMeetingRequestRule(Item As Outlook.MeetingItem)
> Rem Outlook.Add (olAppointmentItem)
> Open(Outlook.Inspectors.Item.CurrentItem)
> End Sub
>
> Either
> Outlook.Add (olAppointmentItem) OR
> Open(Outlook.Inspectors.Item.CurrentItem)
> is working.
>
> Can anyone give me the right syntax for opening current appt item.
>

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net