

Leave this line of code out and your script will be doomed to fail. Nevertheless you still need to call the GetNamespace method and explicitly bind to the MAPI namespace. As it turns out, the MAPI namespace is the only namespace you can bind to when using Microsoft Outlook. After defining the constant we create an instance of the Outlook.Application object, then use the following line of code to bind to the MAPI namespace: Set objNamespace = objOutlook.GetNamespace("MAPI") We start out by defining a constant named olFolderCalendar and setting the value to 9 this tells the script which Outlook folder we want to work with. Set objFolder = objNamespace.GetDefaultFolder(olFolderCalendar) Set colItems = objFolder.Items For Each objItem in colItemsĪs you can see, this is actually a pretty simple little script. Set objNamespace = objOutlook.GetNamespace("MAPI") Speaking of our regular jobs, let’s take time out from the Scripting Games to show you a script that can set a reminder on all your Microsoft Outlook appointments and meetings: Const olFolderCalendar = 9 Set objOutlook = CreateObject("Outlook.Application") Although, would you like to take a guess as to who had the idea for the Scripting Games in the first place? And who wanted to add even more scripting languages? And who wants to start traveling around the world during the Scripting Games next year? And who insists we need to get even more people to enter the Scripting Games? (Well, okay, that last one would be both the nerds – er, Scripting Guys.)
Add reminder to outlook plus#
Interesting enough, the Scripting Son refers to his father and his colleagues as “nerds.” Nerds?!? The Scripting Guys are definitely not nerds after all, no self-respecting nerd would spend an entire weekend testing hundreds and hundreds of Perl, VBScript, and Windows PowerShell scripts.īut do you know what the best thing is about the Scripting Games? (And no, believe it or not it’s not staying up until 2:00 AM testing scripts that calculate the amount of water required to fill a swimming pool.) Instead, the best thing about the Scripting Games is the fact that the Scripting Guys get to do all the Scripting Games-related work plus our regular jobs it’s like working two full-time jobs but only getting paid for one! Have you ever wondered how Microsoft managed to sock away so much money? Well, now you know.Įd itor’s Note: Okay, we all know how overworked the Scripting Guy who writes this column is.

(The Games run until March 3 rd, which means there’s sill plenty of time to have some fun and maybe win yourself a ton of great prizes.) How do the Scripting Guys plan to spend their time off this coming weekend? The same way most people plan to spend their time off this coming weekend: testing hundreds and hundreds of Perl, VBScript, and Windows PowerShell scripts, scripts submitted as part of the on-going 2008 Winter Scripting Games. Or so we think to tell you the truth, after you’ve stayed up till the wee hours of the morning several nights in a row, well, at some point the days all kind of meld together.Īnd yes, that includes the weekends, too.

I like reminders and I try to remember to turn them on, but sometimes I forget that means that if I’m not on top of my schedule, I can miss a meeting. How can I write a script that will go through all my meetings and appointments and add a reminder to them? Hey, Scripting Guy! My manager does not like appointment reminders therefore every meeting request she sends is without reminders.
