Adding a name to 5 calendar dates in Outlook 2003

Posted on 2007-07-31
Last Modified: 2010-04-08
In Outlook 2003, I have a schedule of classes for the entire week in my calendar. So for instance I have Word 1 on Monday, Word 2 on Tues, etc. After all of these are in the calendar, if someone emails and says I want to sign up for all 5 Word classes next week, is there any way to add there name to every class that week without have to cut and paste 5 times one for each day or can I add them to all 5 days in one fell swoop?

Question by:contrain
    LVL 76

    Expert Comment

    by:David Lee
    Hi, contrain.

    Yes, it's possible using a bit of scripting.  Is that an option?

    Author Comment

    Possibly, what would I have to do?
    LVL 76

    Expert Comment

    by:David Lee
    You'd select the classes you want to add the person to, then run a macro.  The macro would add the person to all selected classes.

    Author Comment

    How would I create this macro in Outlook?
    LVL 76

    Accepted Solution

    Here's the macro.  Follow these instructions to use it.

    1.  Start Outlook
    2.  Click Tools->Macro->Visual Basic Editor
    3.  If not already expanded, expand Modules and click on Module1
    4.  Copy the code below and paste it into the right-hand pane of the VB Editor
    5.  Edit the code as needed.  I placed a comment before each line that needs to be edited
    6.  Click the diskette icon on the toolbar to save the changes
    7.  Close the VB Editor
    8.  Click Tools->Macro->Security
    9.  Change the Security Level setting to Medium
    10.  Select one or more appointments on any calendar.
    11.  Run the macro.  It will display a dialog-box prompting you to enter a name or email address.  If you don't enter anything or if you click cancel, then the macro does nothing.  

    Sub AddRecipientToAppointment()
        Dim olkAppointment As Outlook.AppointmentItem, _
            olkRecipient As Outlook.Recipient, _
            strName As String
        strName = InputBox("Enter the name or email address of the person to add to the appointment.", "Add Recipient to Appointment")
        If strName <> "" Then
            For Each olkAppointment In Application.ActiveExplorer.Selection
                With olkAppointment
                    Set olkRecipient = .Recipients.Add(strName)
                    olkRecipient.Type = olTo
                End With
        End If
        Set olkRecipient = Nothing
        Set olkAppointment = Nothing
    End Sub
    LVL 76

    Expert Comment

    by:David Lee
    Is there anything else I can do to help with this question?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Outlook can send email in three different formats: HTML, Rich Text, and Plain Text. Rich Text format is problematic though as it automatically wraps all formatting into an attachment called Winmail.dat. It also tends to pack actual file attachments …
    Learn more about the importance of email disclaimers with our top 10 email disclaimer DOs and DON’Ts.
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now