Add Form to Appointments Received, Automatically

Status
Not open for further replies.
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
 
Status
Not open for further replies.
Similar threads
Thread starter Title 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
U Is it posible to Invoke a custom Form in my Outlook Add-in tool ba Outlook VBA and Custom Forms 1
V How to add 'Previous Item' and 'Next Item' to the Quick Access Toolbar Using Outlook 1
Commodore Safe way to add or update holidays; Windows Notifications issue Using Outlook 8
kkqq1122 How would I add Search for attachment name Outlook VBA and Custom Forms 3
L did MS ever add way to text via Outlook Using Outlook 5
P How to add a column named categories when searching in Outlook Using Outlook 0
M add new attendee to existing meetings with VBA Outlook VBA and Custom Forms 5
N Can't create NEW GROUP and add/remove a member from existing Group in Outlook Using Outlook 1
witzker Outlook 2019 Pls. add a Prefix for OUTLOOK 2019 here Using Outlook 1
P Add inanimate objects to meetings? Using Outlook 1
O Outlook 2010 Add delete button to the side of the message list Using Outlook 1
BartH Add a string to the conditions in .Conditions.BodyOrSubject.Text Outlook VBA and Custom Forms 2
A "Get Add-Ins" - Which Version of Outlook to use Using Outlook 1
D Do I need Exchange Add-In? Using Outlook 6
C-S-R Manage Add-ins (Remove Wunderlist) Using Outlook 6
A iCloud add in problems Using Outlook 4
L Macro to add Date & Time etc to "drag to save" e-mails Outlook VBA and Custom Forms 17
C Looking for feedback on new Outlook Add-in Using Outlook 0
L isn't there an OL add-on that flags addressee before sending Using Outlook 3
S Add VBA save code Using Outlook 0
P Shortcut Pane - add shortcut to Office365 group mailbox Using Outlook 1
Z 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
Z 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

Similar threads

Top