Consulting

Results 1 to 7 of 7

Thread: OL2010 - Macro to insert text into the Location field of a Meeting Invite

  1. #1

    OL2010 - Macro to insert text into the Location field of a Meeting Invite

    I need a macro that will insert specified text into the location field of a meeting invitation. The purpose is for conference call meeting invites. The macro would insert the call-in nuber and attendee access code for me.

    For your example, you can use the following text:
    CALL: 800-555-1212 / CODE: 9879876

    I am not a developer or programmer. I do know how to use and sometimes tweak other peoples' VBA code, though - but just the basics. Until now, I've never toyed with macros in Outlook, however.

    I'm guessing this is pretty easy to do. I figured out a way to insert text into the body of the meeting invite, but I'm having trouble tweaking it to put the text into the Location field instead.

    Thanks in advance for your help!

    ~N

  2. #2

  3. #3
    Have you looked at https://msdn.microsoft.com/en-us/lib...or=-2147217396 ?
    The location in that macro is
    myItem.Location = "The location"
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

  4. #4
    gmayor - I really appreciate the help and apologize for the delay. This is very close to what I want. I stripped it down to the parts I need:

    Sub InsertConfCallInfo()
     Dim myItem As Object
     Set myItem = Application.CreateItem(olAppointmentItem)
     myItem.Location = "CALL: (866) 555-1212 / CODE: 9854101812"
     myItem.Display
    End Sub
    The only difference is that this macro creates an new appointment with the data I want in the location field.

    Normally, however, I will already have an appointment open and want the text inserted there.

    How would I accomplish this with a new appointment that is currently in focus?

    ~N

  5. #5
    If you want to work with the currently open item you need to use the following
    Option Explicit
    Sub InsertConfCallInfo()
    Dim myItem As AppointmentItem
        On Error GoTo lbl_Exit
        Set myItem = ActiveInspector.CurrentItem
        myItem.Location = "CALL: (866) 555-1212 / CODE: 9854101812"
        'myItem.Display 'Not required as the item is already displayed.
    lbl_Exit:
        Exit Sub
    End Sub
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

  6. #6

    Solved. Thanks!

    gmayor - That did the trick. Thanks so much!

  7. #7
    Hi N,


    To accomplish this, you can use a VBA macro in Outlook to insert the specified text into the location field of a meeting invitation. I can help you with the VBA code to achieve this. Let me know if you'd like me to provide the code for you.


    Best regards,

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •