• Outlook User
  • Exchange Admin
  • Office 365
  • Outlook Developer
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
    • Common Problems
    • Outlook BCM
    • Utilities & Addins

Accept or decline a meeting request then forward or copy it

Slipstick Systems

› Developer › Accept or decline a meeting request then forward or copy it

Last reviewed on November 16, 2014     48 Comments

I had two questions this week that were similar. In one, the user wanted to decline a meeting but keep a copy of the appointment, the other user wanted to forward accepted meeting to another mailbox.

While these requests don't sound all that similar, the same basic VBA code can be used for both. With one request, we need to copy the fields to a new appointment then decline the meeting, the other one is forwarded then accepted. You can use the basics of these macros to do other things with incoming meeting requests.

Both macros need the GetCurrentItem function listed at the end of this page. This allows you to either select a meeting request in the message list in your inbox or open it to accept or decline.

Rather than using the Accept or Decline buttons, you need to use the macro to accept or decline the meeting then "do whatever". You can add the macro to a button on your QAT, ribbon, or toolbar.

Add a button to the riubbon to run a macro

Accept and Forward a Meeting

Don't forget to also add the GetCurrentItem (at the end of this page) to Outlook's VBA editor.


Sub AcceptandForward()

Dim oAppt As MeetingItem
Dim cAppt As AppointmentItem
Dim oRequest As MeetingItem

Dim oResponse

Set cAppt = GetCurrentItem.GetAssociatedAppointment(True)
Set oRequest = GetCurrentItem()

Set oAppt = oRequest.Forward
oAppt.Recipients.Add "alias@domain.com"
oAppt.Send

Set oResponse = cAppt.Respond(olMeetingAccepted, True)
oResponse.Send

Set cAppt = Nothing
Set oAppt = Nothing
Set oRequest = Nothing

End Sub

Decline and keep a copy of the meeting

Don't forget to also add the GetCurrentItem (at the end of this page) to Outlook's VBA editor.


Sub SaveAndDecline()

Dim oAppt As AppointmentItem
Dim cAppt As AppointmentItem

Dim oResponse

Set cAppt = GetCurrentItem.GetAssociatedAppointment(True)
Set oAppt = Application.CreateItem(olAppointmentItem)

With oAppt
    .Subject = "Declined: " & cAppt.Subject
    .Start = cAppt.Start
    .Duration = cAppt.Duration
    .Location = cAppt.Location
    .Save
End With

Set oResponse = cAppt.Respond(olMeetingDeclined, True)
oResponse.Send

Set cAppt = Nothing
Set oAppt = Nothing

End Sub

Accept and Move the Invite

When you accept a meeting, the invitation is moved to the deleted items folder. Moving it to another folder is just 4 added lines. Use the macro at the top of the page and add these lines, with oRequest.Move after the Send (or Display) line.

The folder needs to exist at the same level as the Inbox. If you want to move it to subfolder, use Session.GetDefaultFolder(olFolderInbox).Folders("SharedCal"); to use a folder outside of the current data file, see Working with VBA and non-default Outlook Folders.


' add to top section
Dim myFolder As Outlook.folder

' add after Dim section
Set myFolder = Session.GetDefaultFolder(olFolderInbox).Parent.Folders("Accepted Invites")

oResponse.Send
oRequest.Move myFolder

'last line before end sub 
Set myFolder = Nothing

Accept and Forward a Copy to Another Address

When Exchange server users forward a meeting request, the organizer may be notified the meeting was forwarded. The organizer or administrator can disable this feature, but if you aren't sure if it's disabled and want to avoid generating the notification, you can use a macro to generate a new meeting request and forward it to the address.

This should only be used to forward meetings to your personal account, not to forward the meeting information to other users.

Sub AcceptAndForward()
 
Dim oAppt As AppointmentItem
Dim cAppt As AppointmentItem
Dim meAttendee As Outlook.Recipient
Dim oResponse
 
Set cAppt = GetCurrentItem.GetAssociatedAppointment(True)
Set oAppt = Application.CreateItem(olAppointmentItem)
 
With oAppt
    .MeetingStatus = olMeeting
    .Subject = "Accepted: " & cAppt.Subject
    .Start = cAppt.Start
    .Duration = cAppt.Duration
    .Location = cAppt.Location
    Set meAttendee = .Recipients.Add("me@mydomain.com")
     meAttendee.Type = olRequired
    .Send
End With
 
Set oResponse = cAppt.Respond(olMeetingAccepted, True)
oResponse.Send
 
Set cAppt = Nothing
Set oAppt = Nothing
 
End Sub

GetCurrentItem Function

With either of these macros (and many others on this site), you need to use the GetCurrentItem function if you want to use the macro with either opened items or selected items. You only need to have this once within your VBA project and can use it with as many macros as you want.

Function GetCurrentItem() As Object
    Dim objApp As Outlook.Application
         
    Set objApp = Application
    On Error Resume Next
    Select Case TypeName(objApp.ActiveWindow)
        Case "Explorer"
            Set GetCurrentItem = objApp.ActiveExplorer.Selection.Item(1)
        Case "Inspector"
            Set GetCurrentItem = objApp.ActiveInspector.CurrentItem
    End Select
     
    Set objApp = Nothing
End Function

How to add the macro to Outlook and create a toolbar button

Note: you'll also need to open a meeting request and add a button to it, if you want the macro easily accessible from an opened message.

Accept or decline a meeting request then forward or copy it was last modified: November 16th, 2014 by Diane Poremsky
  • Twitter
  • Facebook
  • LinkedIn
  • Reddit
  • Print

Related Posts:

  • This macro copies a meeting request to an appointment. Why would you w
    Copy meeting details to an Outlook appointment
  • set a reminder using a rule
    Set a reminder when accepting a meeting request
  • Keep Canceled Meetings on Outlook's Calendar
  • Copy Selected Occurrence to an Appointment

About Diane Poremsky

A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Subscribe
Notify of
48 Comments
newest
oldest most voted
Inline Feedbacks
View all comments

dronics (@guest_214833)
February 28, 2020 12:32 pm
#214833

Hi Diane,
I'm trying to use the "Accept and Forward a Copy to Another Address" on Outlook 2016 and it seems to work with my gmail account. Only thing is that it doesn't delete the meeting invite in my inbox like the normal "Accept" does.
I know that you answered someone with a similar issue in the comments but I think this was back in 2015/2016.
Could you let me know what needs to be done to the "Accept and Forward a Copy to Another Address" vba to delete the meeting invite please?

0
0
Reply
Marion (@guest_210940)
April 24, 2018 11:30 am
#210940

Could it be that it doesn't work with MS Office Professional Plus 2013 in combination with exchange server? I get an error message. It says: "The operation failed. The message interfaces have returned an unknown error. Cannot resolve recipient" When I debug I see a yellow arrow at the line .Send

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Marion
April 24, 2018 12:51 pm
#210941

it works with exchange - at least in cached mode. Are you using classic online or cached?

I'll see if i can repro that error - it sounds like it is not connecting to the address book.

0
0
Reply
Marion (@guest_210968)
Reply to  Diane Poremsky
April 28, 2018 12:56 pm
#210968

I guess I use the cached one. In the company we use outlook from the Office package. It is installed on all the laptops.

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Marion
April 24, 2018 12:54 pm
#210942

Which macro are you using?
Does the address its being sent to have single quotes or other characters around the email address?

0
0
Reply
Marion (@guest_210969)
Reply to  Diane Poremsky
April 28, 2018 1:02 pm
#210969

I used the Sub AcceptandForward()
And I replaced alias@domain.com for my mailaddress

0
0
Reply
Marion (@guest_210970)
Reply to  Diane Poremsky
April 28, 2018 2:04 pm
#210970

I have used Accept and Forward a Copy to Another Address. The macro runs without problems if I cut and paste the text from the macro as it is on this page (with the address "me@mydomain.com"). It is when I replace the me@mydomain.com mail address for my own outlook.com or gmail.com address when the error occurs.

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Marion
April 29, 2018 12:45 pm
#210972

What is the error message?

0
0
Reply
Marion (@guest_210971)
Reply to  Diane Poremsky
April 29, 2018 5:50 am
#210971

I have tried a few things. The macro works fine when I leave out the dot between my first name and last name in the first part of the email address. So "firstnamelastname@....." works fine, but "firstname.lstname....." doesn't. Unfortunately, my mail address is the one with the dot in it. Also, when the macro has run, the invitation email is still in the inbox.

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Marion
April 29, 2018 11:00 pm
#210976

So this line: oAppt.Recipients.Add "alias@domain.com"
when the alias had a got in it, fails?
oAppt.Recipients.Add "al.ias@domain.com"

There is no reason why it shouldn't work as long as the address is in quotes but I will see if i can repro.

0
0
Reply
KLE (@guest_207624)
July 11, 2017 4:16 am
#207624

GetCurrentItem only seems to work with selected meeting invite (email) item and not with a selected meeting item in calendar view. How could this be achieved?

Thanks.

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  KLE
July 15, 2017 8:19 am
#207712

Set cAppt = GetCurrentItem.GetAssociatedAppointment(True) is looking for the appointment associated with the appointment, not the appointment itself. Application.ActiveExplorer.Selection.Item(1) applies to the selected item.

FWIW, it's recommended to accept or decline from the email, not from your calendar - accepting from the calendar doesn't delete the matching email.

0
0
Reply
Nick (@guest_206619)
May 18, 2017 5:40 pm
#206619

I am using Script 3 to Accept the appointment to my Calendar and then send a
copy to a shared team calendar. The original MeetingItem is left in my inbox.
I attempted to use the oRequest.Delete line but I don't believe oRequest is
defined in that example.
I am a total noob at this and am learning a lot through this site and googling but
I have reached the point where I am just guessing now.

Sub AcceptAndForward()

Dim oAppt As AppointmentItem
Dim cAppt As AppointmentItem
Dim meAttendee As Outlook.Recipient
Dim oResponse
Dim oRequest As Outlook.MeetingItem

Set cAppt = GetCurrentItem.GetAssociatedAppointment(True)
Set oAppt = Application.CreateItem(olAppointmentItem)

With oAppt
.MeetingStatus = olMeeting
.Subject = cAppt.Subject
.Start = cAppt.Start
.Duration = cAppt.Duration
.Location = cAppt.Location
Set meAttendee = .Recipients.Add("email address removed")
meAttendee.Type = olRequired
.Send
End With

Set oResponse = cAppt.Respond(olMeetingAccepted, True)
oResponse.Send

Set oRequest = MeetingItem.Delete(olMeetingAccepted, True)
oRequest.Delete

Set cAppt = Nothing
Set oAppt = Nothing
Set oRequest = Nothing

End Sub

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Nick
May 24, 2017 4:56 pm
#206746

At the top, either right before or right after Set cAppt, add this line:
Set oRequest = GetCurrentItem()
(and use the GetCurrentItem function)

0
0
Reply
GA Nielsen (@guest_198289)
April 28, 2016 2:18 pm
#198289

The Accept and Forward Copy is working for me but it creates a duplicate appointment. How do I prevent this from happening?

1
0
Reply
Guillaume de Fombelle (@guest_192466)
August 11, 2015 9:07 am
#192466

Thanks for the code for declining and saving!
What would be the line to be added, for the status to show as available?
I tried .MeetingStatus = 1 and others without success

Note: I also added .ReminderSet = False which seems to make sense

0
0
Reply
adsa (@guest_189596)
March 3, 2015 9:58 pm
#189596

Keep getting an error run time error 438 : object doesn't support property or method

1
0
Reply
brandonrsullivan (@guest_188541)
January 7, 2015 10:54 am
#188541

Hi Diane,

Little help with a tweak, please.

I want to decline a meeting but be able to easily change the response later. I tried Save & Decline, but it creates a copy. Can I Decline and Save the original to my Calendar as Free?

As my schedule changes, this would allow me to easily change my response from the event and inform the organizer of my change in status.

Thanks!

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  brandonrsullivan
January 8, 2015 12:48 pm
#188565

I am not aware of any way that will allow you to decline and keep the cancelled appointment, sorry. Tentative was intended for situations like this where you aren't sure if you can attend.

0
0
Reply
brandonrsullivan (@guest_188566)
Reply to  Diane Poremsky
January 8, 2015 1:28 pm
#188566

Thank you so much for the quick reply. The scenario is not quite as you mention, however. Frequently I decline meetings I have already accepted because a more important event is created. This more important event is then canceled and I want to rejoin the original meeting. It is never tentative at all, you see.

However, in terms of "logic" what I would like to do is to suppress the deletion of an event not from the invite, but from the appointment itself. So would it be possible to create a Macro that would send the decline message to the organizer, but not perform the delete activity? If this is possible, then I'd add in the script to set Free/Busy as "Free".

Does that clarify or add any thoughts on possibilities?

Thank you so much.

Brandon

0
0
Reply

Visit Slipstick Forums.
What's New at Slipstick.com

Latest EMO: Vol. 28 Issue 11

Support Services

Do you need help setting up Outlook, moving your email to a new computer, migrating or configuring Office 365, or just need some one-on-one assistance?

Subscribe to Exchange Messaging Outlook






Our Sponsors

CompanionLink
ReliefJet
  • Popular
  • Latest
  • WeekMonthAll
  • Adjusting Outlook's Zoom Setting in Email
  • How to Remove the Primary Account from Outlook
  • Cannot add Recipients in To, CC, BCC fields on MacOS
  • Move an Outlook Personal Folders .pst File
  • Save Sent Items in Shared Mailbox Sent Items folder
  • Create rules that apply to an entire domain
  • Outlook's Left Navigation Bar
  • Use PowerShell to get a list of Distribution Group members
  • View Shared Calendar Category Colors
  • Remove a password from an Outlook *.pst File
  • Cannot add Recipients in To, CC, BCC fields on MacOS
  • Change Appointment Reminder Sounds
  • Messages appear duplicated in message list
  • Reset the New Outlook Profile
  • Delete Old Calendar Events using VBA
  • Use PowerShell or VBA to get Outlook folder creation date
  • Outlook's Left Navigation Bar
  • Contact's Display Bug
  • Use PowerShell to get a list of Distribution Group members
  • Edit Outlook’s Attach File list
Ajax spinner

Newest Code Samples

Delete Old Calendar Events using VBA

Use PowerShell or VBA to get Outlook folder creation date

Rename Outlook Attachments

Format Images in Outlook Email

Set Outlook Online or Offline using VBScript or PowerShell

List snoozed reminders and snooze-times

Search your Contacts using PowerShell

Filter mail when you are not the only recipient

Add Contact Information to a Task

Process Mail that was Auto Forwarded by a Rule

Recent Bugs List

Microsoft keeps a running list of issues affecting recently released updates at Fixes or workarounds for recent issues in Outlook for Windows.

Outlook for Mac Recent issues: Fixes or workarounds for recent issues in Outlook for Mac

Office Update History

Update history for supported Office versions is at Update history for Office

Outlook Suggestions and Feedback

Outlook Feedback covers Outlook as an email client, including Outlook Android, iOS, Mac, and Windows clients, as well as the browser extension (PWA) and Outlook on the web.

Use Outlook.com Feedback for suggestions or feedback about Outlook.com accounts.

Other Microsoft 365 applications and services




Windows 10 Issues

  • iCloud, Outlook 2016, and Windows 10
  • Outlook Links Won’t Open In Windows 10
  • Outlook can’t send mail in Windows 10: error Ox800CCC13
  • Missing Outlook data files after upgrading Windows?

Outlook Top Issues

  • The Windows Store Outlook App
  • The Signature or Stationery and Fonts button doesn’t work
  • Outlook’s New Account Setup Wizard
  • Outlook 2016: No BCM
  • Exchange Account Set-up Missing in Outlook 2016

VBA Basics

How to use the VBA Editor

Work with open item or selected item

Working with All Items in a Folder or Selected Items

VBA and non-default Outlook Folders

Backup and save your Outlook VBA macros

Get text using Left, Right, Mid, Len, InStr

Using Arrays in Outlook macros

Use RegEx to extract message text

Paste clipboard contents

Windows Folder Picker

Custom Forms

Designing Microsoft Outlook Forms

Set a custom form as default

Developer Resources

Developer Resources

Developer Tools

Outlook-tips.net Samples

VBOffice.net samples

SlovakTech.com

Outlook MVP David Lee

MSDN Outlook Dev Forum

Repair PST

Convert an OST to PST

Repair damaged PST file

Repair large PST File

Remove password from PST

Merge Two Data Files

Sync & Share Outlook Data

  • Share Calendar & Contacts
  • Synchronize two computers
  • Sync Calendar and Contacts Using Outlook.com
  • Sync Outlook & Android Devices
  • Sync Google Calendar with Outlook
  • Access Folders in Other Users Mailboxes

Contact Tools

Data Entry and Updating

Duplicate Checkers

Phone Number Updates

Contact Management Tools

Diane Poremsky [Outlook MVP]

Make a donation

Calendar Tools

Schedule Management

Calendar Printing Tools

Calendar Reminder Tools

Calendar Dates & Data

Time and Billing Tools

Meeting Productivity Tools

Duplicate Remover Tools

Mail Tools

Sending and Retrieval Tools

Mass Mail Tools

Compose Tools

Duplicate Remover Tools

Mail Tools for Outlook

Online Services

Productivity

Productivity Tools

Automatic Message Processing Tools

Special Function Automatic Processing Tools

Housekeeping and Message Management

Task Tools

Project and Business Management Tools

Choosing the Folder to Save a Sent Message In

Run Rules on messages after reading

Help & Suggestions

Outlook Suggestion Box (UserVoice)

Slipstick Support Services

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues | Outlook Apps
EMO Archives | About Slipstick | Advertise | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities

Send comments using our Feedback page
Copyright © 2023 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.

wpDiscuz

Sign up for Exchange Messaging Outlook

Our weekly Outlook & Exchange newsletter (bi-weekly during the summer)






Please note: If you subscribed to Exchange Messaging Outlook before August 2019, please re-subscribe.

Never see this message again.

You are going to send email to

Move Comment