A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

add new atendee to an existing appointment



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 5th 09, 02:07 AM posted to microsoft.public.outlook.program_vba
Andrew
external usenet poster
 
Posts: 95
Default add new atendee to an existing appointment

Hi all.

I am stuck. In my enviroment we have a public calendar with heaps of
professional events. i am trying to create a VBA code linked to a button that
once pressed it would add the user that pressed it to the list of required
attendees to the existing event.

Can any one help me

Thank you

Andrew
Ads
  #2  
Old June 5th 09, 02:47 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default add new atendee to an existing appointment

Get the calendar appointment from
Application.ActiveExplorer.Selection.Item(1). Get its Recipients collection,
get NameSpace.CurrentUser.Address. Add that to the Recipients collection
using the Recipients.Add method. Specify the Recipient.Type as olTo, which
means required recipient.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Andrew" wrote in message
...
Hi all.

I am stuck. In my enviroment we have a public calendar with heaps of
professional events. i am trying to create a VBA code linked to a button
that
once pressed it would add the user that pressed it to the list of required
attendees to the existing event.

Can any one help me

Thank you

Andrew


  #3  
Old June 10th 09, 08:05 AM posted to microsoft.public.outlook.program_vba
Andrew
external usenet poster
 
Posts: 95
Default add new atendee to an existing appointment

Hi Ken

Unfortuanly i am very limited in my understanding of the VBA Scripting could
you please show me te example of what you mean.

Thank you for your time

Andrew

"Ken Slovak - [MVP - Outlook]" wrote:

Get the calendar appointment from
Application.ActiveExplorer.Selection.Item(1). Get its Recipients collection,
get NameSpace.CurrentUser.Address. Add that to the Recipients collection
using the Recipients.Add method. Specify the Recipient.Type as olTo, which
means required recipient.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Andrew" wrote in message
...
Hi all.

I am stuck. In my enviroment we have a public calendar with heaps of
professional events. i am trying to create a VBA code linked to a button
that
once pressed it would add the user that pressed it to the list of required
attendees to the existing event.

Can any one help me

Thank you

Andrew



  #4  
Old June 10th 09, 02:09 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default add new atendee to an existing appointment

There's no error handling in this and it's just a basic example that assumes
that whatever is selected is actually an appointment item. The code also
assumes it's running in the Outlook VBA project.

Sub AddRecip()
Dim oAppt As Outlook.AppointmentItem
Dim colRecips as Outlook.Recipients
Dim oRecip As Outlook.Recipient

Set oAppt = Application.ActiveExplorer.Selection.Item(1)
Set colRecips = oAppt.Recipients
Set oRecip = colRecips.Add(Application.Session.CurrentUser.Addr ess)
oRecip.Type = olTo

oAppt.Save

Set oRecip = Nothing
Set colRecips = Nothing
Set oAppt = Nothing
End Sub

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Andrew" wrote in message
...
Hi Ken

Unfortuanly i am very limited in my understanding of the VBA Scripting
could
you please show me te example of what you mean.

Thank you for your time

Andrew


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How delete appointment without scan app the existing appointment Yanshof Outlook - Calandaring 1 March 2nd 09 03:04 PM
Unable to add others to existing appointment Christine Outlook - Calandaring 0 January 16th 09 12:49 AM
delete or change existing appointment khowes Outlook - Calandaring 1 November 21st 08 04:46 PM
When i open an existing appointment in Outlook Calendar, then close, it automatically creates an unwanted recurring appointment. David H Outlook - Calandaring 1 June 28th 07 10:32 AM
Resending Existing Appointment bu to only 1 invitee Danielle Outlook - Calandaring 2 April 4th 07 10:08 PM


All times are GMT +1. The time now is 06:49 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.