KC Lemson

By KC Lemson [MS]

Browse by Tags

Related Posts
  • Blog Post: How to change the icons on custom toolbar buttons

    I've blogged previously about how to create a new toolbar button that runs a macro you've written. Another neat trick about this is to change the icon on this custom toolbar button to be more relevant. I have custom macros to do things such as: Create a task from the selected emails Move mails...
  • Blog Post: How to add a custom toolbar button and give it a tooltip

    Bob asked in the comments on this article if it's possible to add a tooltip to a button. Here's one way to do it programmatically for your own buttons. The below example adds a custom button to the standard toolbar and assigns it a tooltip. Note that the button does not actually do anything in this sample...
  • Blog Post: Count the number of items in your entire mailbox

    First, let me preface this entry by saying that I am an abysmal programmer. I use my basic programming skills to write code that helps me do things in the applications I use, and since these are usually one-time things, I don't worry too much about performance or error checking. Phew, now that that...
  • Blog Post: Quickly view the internet headers of a message in Outlook

    Just about anyone who runs mail servers needs to look at headers from time to time. This is especially true during the development of product such as Exchange, as we track down and fix bugs. I wrote this little macro to make that a little easier. Select a message, click the button to run the macro, and...
  • Blog Post: How to add VBA macro code to Outlook and run it once

    1. Start Outlook 2. Tools | Macros | Security 3. Choose “Medium”, which will prompt you on whether or not you want to run macros (VBA). You may need to restart Outlook at this point in order for that setting to take effect. 4. Tools | Macros | Visual Basic Editor 5. Doubleclick on This Outlook...
  • Blog Post: Count the number of folders in your mailbox with Outlook VBA

    A coworker asked me today if I knew how to count up the total number of folders in his mailbox, in the process of troubleshooting a bug related to having a large number of folders. I had an old script that recursed through a mailbox to count the total number of items (also written for the purposes of...
  • Blog Post: How to add a toolbar button & hotkey to empty the junk e-mail folder in Outlook 2003

    I saw this discussion on Jonathan's blog , so here's one option: #1: Follow the instructions in this article with this code: Public Sub EmptyJunkEmailFolder() Dim outapp As Outlook.Application Set outapp = CreateObject("outlook.application") Dim olitem As Object Dim fldJunk As Outlook.MAPIFolder...
  • Blog Post: "You forgot to attach the file!"

    Yikes, it's been a while since I've posted... and to think for the first 9 months of this blog, I think I posted every single day. I guess I just don't have that much content and I wore it out early... but in reality I think it's more due to my new working arrangement and being more focused when I'm...
  • Blog Post: How to assign a macro to a toolbar button in Outlook

    1. View | Toolbars | Customize 2. On the Commands tab, click Macros on the left-hand side 3. Drag the appropriate macro to the standard toolbar (say, next to the “Send/Receive“ button) 4. Right click on the button and change the Name field if you want to shorten the text or assign a different...
  • Blog Post: A poor man's mail merge

    Several times in the last few months I've needed to send the exact same mail content to a list of people, but each mail had to be separately addressed, for the following reasons: I am expecting each recipient to reply and continue the thread with me. This way there's no risk of "Reply All...
  • Blog Post: Ideas for new Outlook macros?

    An email with a coworker who was recently acquired and is getting accustomed to Outlook after years with PINE reminded me that it's been a while since I wrote any Outlook macros. Plus, I just need an excuse to write some code, I haven't written any in several months and that part of my brain is congealing...
  • Blog Post: Create a task from an email

    John Durant recently blogged about his macro to create a task from an e-mail. I thought that was a great idea, so I modified it a bit to suit my purposes. I frequently take an item from my inbox and Edit | Move to Folder and move it to the tasks folder, which creates a task item. I then tab around to...