How can I auto accept invitations to my calendar and then have them forwarded and auto accepted in another?

Posted on 2008-11-05
Last Modified: 2011-09-20
Hello everyone!

I'm trying to figure out how I can automatically accept meetings in Outlook 2003, have it forwarded to another shared account and have that account automatically accept the meeting request as well.

I tried enabling the auto accept feature in Outlook in Options, then created a forwarding rule to forward any meeting requests to the shared account, and then used a profile switch to enable the auto accept rule there as well.  However this didn't work. Am I missing something??

The email server is Exchange and I do know of the auto accept handler for Exchange but would like to keep this client side if possible.
Question by:MilleniumFalcon
    LVL 76

    Expert Comment

    by:David Lee
    Hi, MilleniumFalcon.

    The auto accept feature only applies to resource account, not regular mailboxes.  I think I can do this with a bit of scripting.  Is that an option?

    Author Comment

    Scripting is fine :)
    LVL 76

    Expert Comment

    by:David Lee
    Ok, here's the script.  You'll use the same basic script on both computers.  Pay attention to the comment in code about what to do for the second person.  I haven't tested this with a second person, so I'm not sure the forward portion works properly.

    1.  Start Outlook
    2.  Click Tools->Macro->Visual Basic Editor
    3.  If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
    4.  Copy the code from the Code Snippet box and paste it into the right-hand pane of
    5.  Outlook's VB Editor window
    6.  Edit the code as needed.  I included comment lines wherever something needs to or can change
    7.  Click the diskette icon on the toolbar to save the changes
    8.  Close the VB Editor
    9.  Click Tools->Macro->Security
    10. Set the Security Level to Medium
    11. Close Outlook
    12. Start Outlook
    13. Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run.  Say yes.
    Private WithEvents olkFolder As Outlook.Items
    Private Sub Application_Startup()
        Set olkFolder = Session.GetDefaultFolder(olFolderInbox).Items
    End Sub
    Private Sub Application_Quit()
        Set olkFolder = Nothing
    End Sub
    Private Sub olkFolder_ItemAdd(ByVal Item As Object)
        Dim olkAppointment As Outlook.AppointmentItem, olkMeeting As Outlook.MeetingItem
        If Item.Class = olMeetingRequest Then
            Set olkAppointment = Item.GetAssociatedAppointment(True)
            Set olkMeeting = olkAppointment.Respond(olResponseAccepted, True)
            'Remove the next four, five if you count the comment, lines of code for the second person'
            Set olkMeeting = Item.Forward
            'Change the address on the following line'
            olkMeeting.Recipients.Add ""
        End If
    End Sub

    Open in new window


    Author Comment

    HIa! Thanks for the script.

    On the client side it works great!

    An update from the end user, the shared calendar is utilized via OWA.

    So two questions come to mind:

    A) can this be somehow enabled via OWA
    B) can someone log into the shared account via Outlook through an alternate profile, setup a simple rule to just accept this, and have it auto apply non-outlook client side..or...?
    LVL 76

    Expert Comment

    by:David Lee
    "can this be somehow enabled via OWA"

    No.  Scripts only work in the full Outlook client.  OWA is Outlook in name only.  It is really an Exchange process running at the server.  It does not support any scripting.

    "can someone log into the shared account via Outlook through an alternate profile, setup a simple rule to just accept this, and have it auto apply non-outlook client side..or...?"

    I'm not clear on what you mean.  The process cannot be handled via a rule.  If it could, then there'd be no need for the script.

    Author Comment

    Ok, so I guess the problem then is on the other side.
    The shared account/calendar is one that just sits on the server, and everyone has access to it, e.g. they login to see it via OWA.

    So nothing can be done server side to allow for any scripting, etc, to just auto accept based off script or otherwise?
    LVL 76

    Accepted Solution

    Exchange does support scripting via event-sinks.  However, unlike scripting at the client a poorly written or buggy event-sink script can bring the entire server down.  I avoid them.  I'm sure an event-sink could be built to do this, I just recommend finding someone with a lot of experience to build it.  

    Wouldn't a solution be to set up a computer with Outlook and leave it running all the time to handle this function?

    Author Comment

    Dunno if thats a possibility but i'll suggest it.

    Either way, thanks for the script, I do appreciate it and will be using it for other purposes as well :)
    LVL 76

    Expert Comment

    by:David Lee
    You're welcome. Glad I could help out.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Integrate social media with email signatures

    Is your company active on social media? Do you also use email signatures? Including social media icons in your email signature is a great way to get fans for free. Let all your email users know you’re on social media quickly and easily, in a single click.

    Email statistics and Mailbox database quotas You might have an interest in attaining information such as mailbox details, mailbox statistics and mailbox database details from Exchange server. At that point, knowing how to retrieve this information …
    Outlook Free & Paid Tools
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now