• Outlook User
  • Exchange Admin
  • Office 365
  • Outlook Developer
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
    • Common Problems
    • Outlook BCM
    • Utilities & Addins

Create an Appointment at the Contact's Address

Slipstick Systems

› Developer › Code Samples › Create an Appointment at the Contact’s Address

Last reviewed on October 30, 2014     1 Comment

One of Outlook's many features is the ability to select one or more contacts and create a new message to or meeting with the contact.

New meeting with contactTo use the built in functions, select one or more contacts then click the Email or Meeting button in the Communicate group in the ribbon in Outlook 2010 and up. (Assign Task, IM, or Call are on the More menu.) In Older versions of Outlook, select the contact(s) and look on the Actions menu.

In all versions, these options are on the right-click menu as well. In Outlook 2010 and up, select the contact(s) then right click and expand Create then select Email or Meeting; in older versions, right click and expand New then select Email or Meeting.

Create a new meeting with contact

However, when you use the "Create Meeting with Contact" function, the contact's address is not added to the location field. You can add this field (or any other contact field) to a meeting when you create the meeting using VBA.

This sample macro adds the Contact's business address, or home address if the business address is empty, to the Location field. It also adds their name and telephone number to the body of the meeting.

To use: customize the ribbon, adding a button for the macro. Then select a contact and click the button to create a new meeting. Instructions are at How to use the VBA Editor.

Sub CreateMeetingatContactLocation()
    
Dim oOL As Outlook.Application
Dim objAppt As Outlook.AppointmentItem
Dim objContact As Outlook.ContactItem
Dim strPhone As String
     
Set oOL = Outlook.Application
Set objAppt = oOL.CreateItem(olAppointmentItem)
Set objContact = oOL.ActiveExplorer.Selection.Item(1)

' Use Business address if available, else home address
If objContact.BusinessAddress <> "" Then
    objAppt.Location = objContact.BusinessAddressStreet & "," & objContact.BusinessAddressCity & "," & objContact.BusinessAddressState & "," & objContact.BusinessAddressPostalCode
    strPhone = objContact.BusinessTelephoneNumber
Else

  objAppt.Location = objContact.HomeAddressStreet & ", " & objContact.HomeAddressCity & " " & objContact.HomeAddressState & " " & objContact.HomeAddressPostalCode
    strPhone = objContact.HomeTelephoneNumber

End If
 
' Add contact's name and phone number to the body
    objAppt.Body = objContact.FullName & " " & strPhone
    objAppt.Display
     
Set objAppt = Nothing
Set objContact = Nothing
Set oOL = Nothing
    
End Sub

How to use macros

First: You will need macro security set to low during testing.

To check your macro security in Outlook 2010 or 2013, go to File, Options, Trust Center and open Trust Center Settings, and change the Macro Settings. In Outlook 2007 and older, it’s at Tools, Macro Security.

After you test the macro and see that it works, you can either leave macro security set to low or sign the macro.

Open the VBA Editor by pressing Alt+F11 on your keyboard.

To put the code in a module:

  1. Right click on Project1 and choose Insert > Module
  2. Copy and paste the macro into the new module.

More information as well as screenshots are at How to use the VBA Editor

Create an Appointment at the Contact's Address was last modified: October 30th, 2014 by Diane Poremsky
  • Twitter
  • Facebook
  • LinkedIn
  • Reddit
  • Print

Related Posts:

  • Create a New Appointment with Contact
  • Create a Series of Tasks Leading up to an Appointment
  • Create Appointment From Email Automatically
  • Create a new Outlook message using VBA

About Diane Poremsky

A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Subscribe
Notify of
1 Comment
newest
oldest most voted
Inline Feedbacks
View all comments

George Z (@guest_199343)
June 14, 2016 12:36 pm
#199343

Thank you for providing this sample macro. I have modified it a bit to use in a production service based environment and has worked out quite nicely. I have customize it to grab some additional details for the contact as well added some input boxes for specific data pertaining to scheduling.

I am wondering if you could provide me an assist with another potential modification i am trying to make.

I would like to run this macro based on an email received and considering the sender is already added to my contacts. I am having trouble calling the macro from my inbox. I have referenced several articles on creating a meeting from an email though I would like to specifically call this macro. Essentially if in email comes in and the contact information exists in my contacts the pull the information from my contact as laid out in this marco.

Thanks in advance for any assistance.

0
0
Reply

Visit Slipstick Forums.
What's New at Slipstick.com

Latest EMO: Vol. 28 Issue 22

Support Services

Do you need help setting up Outlook, moving your email to a new computer, migrating or configuring Office 365, or just need some one-on-one assistance?

Subscribe to Exchange Messaging Outlook






Our Sponsors

CompanionLink
ReliefJet
  • Popular
  • Latest
  • WeekMonthAll
  • How to Remove the Primary Account from Outlook
  • Adjusting Outlook's Zoom Setting in Email
  • Outlook: Web Bugs & Blocked HTML Images
  • Save Sent Items in Shared Mailbox Sent Items folder
  • Move an Outlook Personal Folders .pst File
  • Create rules that apply to an entire domain
  • Use PowerShell to get a list of Distribution Group members
  • View Shared Calendar Category Colors
  • How to Create a Pick-a-Meeting Request
  • Remove a password from an Outlook *.pst File
  • Send Individual Messages when Sending Bulk Email
  • Centrally managed signatures in Office 365?
  • Create a rule to delete spam with no sender address
  • Open Outlook Folders using PowerShell or VBScript
  • Cannot add Recipients in To, CC, BCC fields on MacOS
  • Change Appointment Reminder Sounds
  • Messages appear duplicated in message list
  • Reset the New Outlook Profile
  • Delete Old Calendar Events using VBA
  • Use PowerShell or VBA to get Outlook folder creation date
Ajax spinner

Newest Code Samples

Delete Old Calendar Events using VBA

Use PowerShell or VBA to get Outlook folder creation date

Rename Outlook Attachments

Format Images in Outlook Email

Set Outlook Online or Offline using VBScript or PowerShell

List snoozed reminders and snooze-times

Search your Contacts using PowerShell

Filter mail when you are not the only recipient

Add Contact Information to a Task

Process Mail that was Auto Forwarded by a Rule

Recent Bugs List

Microsoft keeps a running list of issues affecting recently released updates at Fixes or workarounds for recent issues in Outlook for Windows.

Outlook for Mac Recent issues: Fixes or workarounds for recent issues in Outlook for Mac

Office Update History

Update history for supported Office versions is at Update history for Office

Outlook Suggestions and Feedback

Outlook Feedback covers Outlook as an email client, including Outlook Android, iOS, Mac, and Windows clients, as well as the browser extension (PWA) and Outlook on the web.

Use Outlook.com Feedback for suggestions or feedback about Outlook.com accounts.

Other Microsoft 365 applications and services




Windows 10 Issues

  • iCloud, Outlook 2016, and Windows 10
  • Outlook Links Won’t Open In Windows 10
  • Outlook can’t send mail in Windows 10: error Ox800CCC13
  • Missing Outlook data files after upgrading Windows?

Outlook Top Issues

  • The Windows Store Outlook App
  • The Signature or Stationery and Fonts button doesn’t work
  • Outlook’s New Account Setup Wizard
  • Outlook 2016: No BCM
  • Exchange Account Set-up Missing in Outlook 2016

VBA Basics

How to use the VBA Editor

Work with open item or selected item

Working with All Items in a Folder or Selected Items

VBA and non-default Outlook Folders

Backup and save your Outlook VBA macros

Get text using Left, Right, Mid, Len, InStr

Using Arrays in Outlook macros

Use RegEx to extract message text

Paste clipboard contents

Windows Folder Picker

Custom Forms

Designing Microsoft Outlook Forms

Set a custom form as default

Developer Resources

Developer Resources

Developer Tools

VBOffice.net samples

SlovakTech.com

Outlook MVP David Lee

Repair PST

Convert an OST to PST

Repair damaged PST file

Repair large PST File

Remove password from PST

Merge Two Data Files

Sync & Share Outlook Data

  • Share Calendar & Contacts
  • Synchronize two computers
  • Sync Calendar and Contacts Using Outlook.com
  • Sync Outlook & Android Devices
  • Sync Google Calendar with Outlook
  • Access Folders in Other Users Mailboxes

Contact Tools

Data Entry and Updating

Duplicate Checkers

Phone Number Updates

Contact Management Tools

Diane Poremsky [Outlook MVP]

Make a donation

Calendar Tools

Schedule Management

Calendar Printing Tools

Calendar Reminder Tools

Calendar Dates & Data

Time and Billing Tools

Meeting Productivity Tools

Duplicate Remover Tools

Mail Tools

Sending and Retrieval Tools

Mass Mail Tools

Compose Tools

Duplicate Remover Tools

Mail Tools for Outlook

Online Services

Productivity

Productivity Tools

Automatic Message Processing Tools

Special Function Automatic Processing Tools

Housekeeping and Message Management

Task Tools

Project and Business Management Tools

Choosing the Folder to Save a Sent Message In

Run Rules on messages after reading

Help & Suggestions

Submit Outlook Feature Requests

Slipstick Support Services

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues | Outlook Apps
EMO Archives | About Slipstick | Advertise | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities

Send comments using our Feedback page
Copyright © 2023 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.

wpDiscuz

Sign up for Exchange Messaging Outlook

Our weekly Outlook & Exchange newsletter (bi-weekly during the summer)






Please note: If you subscribed to Exchange Messaging Outlook before August 2019, please re-subscribe.

Never see this message again.

You are going to send email to

Move Comment