msoutlook.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Outlook Appointments & Meetings

 
Post new topic   Reply to topic    msoutlook.org Forum Index -> MS Office Outlook
Author Message
Craig Ferrier



Joined: 02 Feb 2008
Posts: 1

PostPosted: Sat Feb 02, 2008 5:56 pm    Post subject: Outlook Appointments & Meetings Reply with quote

I have code to create a meeting which seems to work. As part of the meeting
i want to use a Resource - a calendar for a meeting room. How can I get the
resource (meeting room) to accept and display the meeting in its shared
Outlook calendar.

Here is the code:

Public Function CreateAppointment(SubjectStr As String, BodyStr As String,
LocationStr As String, AttendeesStr As String, Duration As Integer,
StartDate As Date, StartTime As Date, AllDay As Boolean, Optional strStatus
As OlItemType)

Dim OlApp As New Outlook.Application, Appt As Object, safeAppt As Object

Set OlApp = CreateObject("Outlook.Application")
Set Appt = OlApp.Session.GetDefaultFolder(olFolderCalendar).Items
Set safeAppt = CreateObject("Redemption.SafeAppointmentItem")
Set Appt = OlApp.CreateItem(olAppointmentItem)

Appt.Subject = SubjectStr
Appt.Start = Format(StartDate, "mm/dd/yyyy") & " " & StartTime
Appt.Duration = Duration
Appt.ReminderSet = True
Appt.AllDayEvent = AllDay
Appt.OptionalAttendees = AttendeesStr
Appt.Body = BodyStr
Appt.Location = LocationStr
Appt.Save
Appt.MeetingStatus = strStatus
Appt.Resources = "MeetingRoom@mycompany.com"

safeAppt.Item = Appt
safeAppt.Send

Set Appt = Nothing
Set safeAppt = Nothing
Set OlApp = Nothing
End Function

Question: How can i get 'MeetingRoom@mycompany.com' to accept the meeting
and display the meeting in its shared calendar.

Note: Once the meeting is created, if i edit the meeting in my Outlook
Calendars, it will then show up in the resource calendar and i get a
confirmation message "the resources for this meeting have been successfully
booked".

Any help would be greatly appreciated.

Thanks
Craig

PS: we are using exchange

Archived from group: microsoft>public>office>developer>outlook>vba
Back to top
View user's profile Send private message
Ken Slovak - [MVP - Outlo



Joined: 12 Aug 2007
Posts: 405

PostPosted: Sat Feb 02, 2008 7:09 pm    Post subject: Re: Outlook Appointments & Meetings Reply with quote

For that you need an autoaccept script or agent running in Exchange on that
resource mailbox. You should post this question to an Exchange group,
perhaps microsoft.public.exchange.applications. Specify your Exchange
version and setup when you post there.

--
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


"Craig Ferrier" wrote in message @TK2MSFTNGP04.phx.gbl...
>I have code to create a meeting which seems to work. As part of the
>meeting
> i want to use a Resource - a calendar for a meeting room. How can I get
> the
> resource (meeting room) to accept and display the meeting in its shared
> Outlook calendar.
>
> Here is the code:
>
> Public Function CreateAppointment(SubjectStr As String, BodyStr As String,
> LocationStr As String, AttendeesStr As String, Duration As Integer,
> StartDate As Date, StartTime As Date, AllDay As Boolean, Optional
> strStatus
> As OlItemType)
>
> Dim OlApp As New Outlook.Application, Appt As Object, safeAppt As Object
>
> Set OlApp = CreateObject("Outlook.Application")
> Set Appt = OlApp.Session.GetDefaultFolder(olFolderCalendar).Items
> Set safeAppt = CreateObject("Redemption.SafeAppointmentItem")
> Set Appt = OlApp.CreateItem(olAppointmentItem)
>
> Appt.Subject = SubjectStr
> Appt.Start = Format(StartDate, "mm/dd/yyyy") & " " & StartTime
> Appt.Duration = Duration
> Appt.ReminderSet = True
> Appt.AllDayEvent = AllDay
> Appt.OptionalAttendees = AttendeesStr
> Appt.Body = BodyStr
> Appt.Location = LocationStr
> Appt.Save
> Appt.MeetingStatus = strStatus
> Appt.Resources = "MeetingRoom@mycompany.com"
>
> safeAppt.Item = Appt
> safeAppt.Send
>
> Set Appt = Nothing
> Set safeAppt = Nothing
> Set OlApp = Nothing
> End Function
>
> Question: How can i get 'MeetingRoom@mycompany.com' to accept the meeting
> and display the meeting in its shared calendar.
>
> Note: Once the meeting is created, if i edit the meeting in my Outlook
> Calendars, it will then show up in the resource calendar and i get a
> confirmation message "the resources for this meeting have been
> successfully
> booked".
>
> Any help would be greatly appreciated.
>
> Thanks
> Craig
>
> PS: we are using exchange
>
>
>

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msoutlook.org Forum Index -> MS Office Outlook All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group