Add Form to Appointments Received, Automatically

Outlook version
Outlook 2019 64-bit
Email Account
Office 365 Exchange
Can a Form be added automatically on Appointments received (or accepted)?. I need to track details of all meeting I attend, such as client name, product discussed, client location. This functionality exists on appointments I create by setting Calendar Properties to a specific form - I need to do this to appointments received.

Capture.PNG
 
Outlook version
Outlook 2019 64-bit
Email Account
Office 365 Exchange
By jobe, I think I did it:

Option Explicit
Private objNS As Outlook.NameSpace
Private WithEvents objItems As Outlook.Items

Private Sub Application_Startup()

Dim objWatchFolder As Outlook.Folder
Set objNS = Application.GetNamespace("MAPI")

'Set the folder and items to watch:
Set objWatchFolder = objNS.GetDefaultFolder(olFolderCalendar)
Set objItems = objWatchFolder.Items

Set objWatchFolder = Nothing
End Sub
Private Sub objItems_ItemAdd(ByVal Item As Object)

' Your code goes here
If Item.Class = olAppointment Then
If Item.MessageClass <> "IPM.Appointment.NewForm" Then
Item.MessageClass = "IPM.Appointment.NewForm"
Item.Save
End If
End If

End Sub
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
That should have worked... does it fail on all or just meetings?
if you remove the IF message class line does it work?
If Item.MessageClass <> "IPM.Appointment.NewForm" Then

Appointments only have one message class
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
I tested it - it is working. Use a list view and add the message class field to the view - was the message class changed? The ones with the note icon are incoming meetings.
2020-07-19_23-37-14-0000.png
 
Outlook version
Outlook 2019 64-bit
Email Account
Office 365 Exchange
That should have worked... does it fail on all or just meetings?
if you remove the IF message class line does it work?
If Item.MessageClass <> "IPM.Appointment.NewForm" Then

Appointments only have one message class
So... yes I got it to work, thanks to your guidance. Seeing the Message Class is really helpful. I got it to work on my personal Outlook, but not on my employer's Outlook. They must have a macro blocker coming from the outside. So I'll need to create a button within Outlook that triggers the new Message Class on each Appointment I need to change the class on.

Thanks

Charles
 
Thread starter Similar threads Forum Replies Date
R Add 'Company' to Select Names Form Using Outlook 1
BretAB Is it possible to add a lookup field to a Message form? Outlook VBA and Custom Forms 4
D Add Tetxbox at form open Outlook VBA and Custom Forms 1
makinmyway Can I add a Map It Button to Custom Contact Form? How? Outlook VBA and Custom Forms 6
A "Microsoft Exchange Add-In" (UmOutlookAddin.dll) + Outlook Security Form ... Using Outlook 4
T Add 'Move to folder' icon to custom form Using Outlook 1
H How can you add a URL field in a Outlook Custom Contact form? Using Outlook 6
R Add a link to a custom form Using Outlook 0
P Outlook contact form no longer requiring Category selection to add new Using Outlook 1
0 Add a date stamp to the note field of a custom form Outlook VBA and Custom Forms 1
R Add new type and Custom form on exchange Outlook VBA and Custom Forms 3
L [Outlook 2003] Add Table to form Outlook VBA and Custom Forms 2
J Add Option to remove "Links" area form Navigation Pane Outlook Wishlist 3
U Is it posible to Invoke a custom Form in my Outlook Add-in tool ba Outlook VBA and Custom Forms 1
P Shortcut Pane - add shortcut to Office365 group mailbox Using Outlook 1
B Add ComboBox Value to Body of Email Outlook VBA and Custom Forms 1
G How to add a folder shortcut to outlook quick access toolbar? Using Outlook 6
G Add to Outlook Contacts - Point to non-default contacts folder Using Outlook 0
M Automatically add senders first name to a greeting Outlook VBA and Custom Forms 1
O Outlook tasks - Add text column with multiple lines Using Outlook 3
W April 2020 Office 365 Update - Add-Ons fail after Office 365 Update Using Outlook 6
B Task Filter Not Working When I add too many criteria Using Outlook 0
D Add date next to day name in Outlook Today calendar view Using Outlook 1
D iCloud Add-in not working in Outlook 2013 and Outlook 2016 After Windows Upgrade & iCloud Upgrade Using Outlook 2
P Add Paste Unformatted to QAT Using Outlook 1
M Ignore slow add-ins Using Outlook 0
B Add Prefix text to Subject Line Using Outlook 1
Jennifer Murphy Add birthdays to calendar Using Outlook 7
Z Add text to auto-forwarded e-mail Outlook VBA and Custom Forms 4
P Add, remove, & reorder folder pane Using Outlook 6
L Tired of Outlook disabling Adobe PDF Creator add-in Using Outlook 1
A Outlook 2016 Web add-in missing on some machines Using Outlook 9
P Syncing problems with add-ins Using Outlook 3
Mark Foley Cannot enable add-in in outlook 2010 Using Outlook 0
J Add an Attachment Using an Array and Match first 17 Letters to Matching Template .oft to Send eMail Outlook VBA and Custom Forms 2
iwshim outlook 2013 - I cannot see the "Manage Add-ins" Using Outlook 2
A Add multiple servers "on behalf of" email to "safe senders" list. Using Outlook 1
S Add Exchange Account as Secondary to Existing PST? Exchange Server Administration 1
C Macro to add multiple recipients to message Outlook VBA and Custom Forms 3
A Add to Outlook Contacts from email - default view Outlook VBA and Custom Forms 1
P Add a contact to the New Task in Outlook 2016 Using Outlook 2
e_a_g_l_e_p_i Is there a way to add something that is in the "Format Text" tab to the "basic Text" on the message tab Using Outlook 1
B When working on emails in a certain folder, when I hit reply or reply all, I would like it re always reply all and add an email address to send to Outlook VBA and Custom Forms 3
M Macro to add date/time stamp to subject Outlook VBA and Custom Forms 4
O Outlook on Android - add BCC Using Outlook 2
J Execute Add-In Button from VBA Outlook 2016 Outlook VBA and Custom Forms 1
S Example VBA Macro - To Conditionally Change the From Account and Add a BCC Address on Emails Outlook VBA and Custom Forms 11
B When I add more search strings to RULES, it is not processing them Using Outlook 3
Andrew Quirl Open attachment, manipulate without add-on program? Outlook VBA and Custom Forms 5
B Searching for a Add-In Using Outlook 3
Similar threads


















































Top