- #Microsoft office 2016 outlook calendar delete entry how to#
- #Microsoft office 2016 outlook calendar delete entry code#
#Microsoft office 2016 outlook calendar delete entry code#
VB.NET code example Friend Sub CreateRecurringAppointmentWithReminder(reminderText As String, _ĭim pattern As Outlook.RecurrencePattern = Nothing With apptItem To add a reminder to the appointment, we need to set its ReminderSet property to true. This situation is due to the fact that you need to create a ReccurancePattern object for the appointment.
#Microsoft office 2016 outlook calendar delete entry how to#
Here, I show you how to create recurring appointment as well as how to set a reminder in Outlook.Ĭreating a recurring appointment is a bit more involved than you might think it would be. This sample kills two birds with one stone. How to create a recurring appointment (as a reminder) Then we set a few properties and save it. If apptItem IsNot Nothing Then Marshal.ReleaseComObject(apptItem)įirst we use the CreateItem method to create the AppointmentItem. Here is how it’s done: Friend Sub CreateAppointment(title As String)ĭim apptItem As Outlook.AppointmentItem = Nothing I stated previously that you can only create AppointmentItems with code (and that you can’t create MeetingItems)… and it’s true. This strategy helps ensure you access only the item types you want… reducing the potential for error. Using the message class, you quickly filter a folder’s items to the objects you desire. Okay, this is a somewhat lame except that it makes a nice segue into informing you of the different message classes in play when working with the calendars. If calendar IsNot Nothing Then Marshal.ReleaseComObject(calendar) If calendarItems IsNot Nothing Then Marshal.ReleaseComObject(calendarItems)
)Įlse 'MeetingItem (are assume that is the case)Ĭonsole.WriteLine(calendarItems.MessageClass) VB.NET code example Friend Sub EnumerateDefaultAppointmentsAndDoSomethingSillyThatIllustratesAPoint( _ĭim calendar As Outlook.Folder = Nothing Dim calendarItems As Outlook.Items The code loops through the folder’s items collection and prints out its message class. To make this happen, we’ll work with Outlook appointments residing in the default calendar. I thought of you, my fellow developer, and I want you to steal this code. In fact, I daresay they are not lame at all as they can be quite useful. I have a few code samples that show the basics of Outlook calendars but also aren’t too lame.