Create an Appointment at the Contact's Address From Email

Status
Not open for further replies.

George Z

New Member
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server
Utilizing the following macro written by Diane Poremsky. It has been a great little macro for use in our service department. I have modified the macro a bit to also pull additional information from the contact as well as utilize a couple input boxes to collect data specific to service call. Below is the modified version of the macro.

I am attempting to make a new revision I am stumbling with a bit. I have some contacts
which i receive emails from requesting a service call. I would like to modify the macro to run from my inbox when a mail message is selected, and the customer contact information is present in my contacts. I have seen several macros to create an appointment base on an email message though I would like the appointment data to be pulled from the contact ( as outlined below) versus the email itself. Any assistance would be greatly appreciated. Thanks in advance!


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)

inputdata = InputBox("Please Enter Service Technican and Van Number in the FollowinG Format 14 MM/TS")
inputdata1 = InputBox("Please Enter a Descpiption of the Problem")
inputdata2 = InputBox("If a Man Lift is Required to Complete Service please note if lift will be provided by Beaton or Customer. If no Manlift is Needed enter Not Required")
inputdata3 = InputBox("Please Enter Company Hours of Operation to Complete Service")
inputdata4 = InputBox("Please Enter Location and Status of Required Parts if Applicable. Enter N/A if Not Applicable.")
inputdata5 = InputBox("Please Enter the Priority Level of Equipment Failure and Date Customer is Expecting Service")
inputdata6 = InputBox("Please Enter any Other Additional Notes Relevant to Service Request, Customer Expectation, and or Technical Details")

' Use Company for Location
If objContact.CompanyName <> "" Then
objAppt.Subject = inputdata & " , " & objContact.CompanyName & ", - OR - " & objContact.FullName & " , Phone: " & objContact.BusinessTelephoneNumber & " , Cell: " & objContact.MobileTelephoneNumber

' 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 = "DESCRIPTION OF PROBLEM: " & inputdata1 & vbNewLine & vbNewLine & "MANLIFT: " & inputdata2 & vbNewLine & vbNewLine & "HOURS OF OPERATION: " & inputdata3 & vbNewLine & vbNewLine & "REQUIRED PARTS AND STATUS: " & inputdata4 & vbNewLine & vbNewLine & "SERVICE PRIORITY: " & inputdata5 & vbNewLine & vbNewLine & "ADDITIONAL NOTES: " & inputdata6
objAppt.Display


Set objAppt = Nothing
Set objContact = Nothing
Set oOL = Nothing

End If
End Sub
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
J Create an appointment from Contact list with the Company name in the Subject line Using Outlook 1
M right click contact to create an appointment Using Outlook 4
A Create Appointment with Contact Using Outlook 4
Chiba Create an appointment for all the members Outlook VBA and Custom Forms 1
Nessa Can't create new appointment Using Outlook 1
Diane Poremsky Create Task or Appointment and Insert Selected Text New Slipstick.com Articles 0
Diane Poremsky Create Appointment From Email Automatically New Slipstick.com Articles 0
M receive mail when appointment category changes and create task from appointment Outlook VBA and Custom Forms 0
B VBA Code to create appointment from email Outlook VBA and Custom Forms 1
Diane Poremsky Create an Outlook appointment from an email message New Slipstick.com Articles 4
Diane Poremsky Create an Appointment Diary New Slipstick.com Articles 0
M Create an Appointment from XL Spreadsheet in a Shared Calendar. Outlook VBA and Custom Forms 1
anoble1 How to create an email with a link to add a calendar appointment Using Outlook 1
T How to create meeting recurrences that are not available in the appointment screen? Using Outlook 1
I how to create appointment using saved template onto public folder shared calendar Using Outlook 3
B Create appointment/meeting from shared mailbox Using Outlook 2
P Create appointment to custom (shared) outlook calendar Outlook VBA and Custom Forms 3
R Create appointment skipping weekends and within a timeframe Outlook VBA and Custom Forms 1
S Create a clickable custom column field Outlook VBA and Custom Forms 0
O Create a custom contact form - questions before messing things up... Outlook VBA and Custom Forms 4
C Can't create Outlook data file Outlook Wishlist 0
L automaticaly create a teams meeting with a sync Using Outlook 0
D Can Exchange Admin Center create a pst for users email/contacts/calendar? Exchange Server Administration 0
S Create A Search Folder That Looks For Message Class? Outlook VBA and Custom Forms 0
F How to create phone number as links in notes of Contacts Using Outlook 2
A Create date folder and move messages daily Outlook VBA and Custom Forms 1
C Create new Message with shared contacts & BCC'ing recipients Outlook VBA and Custom Forms 0
O Multiple email accounts - hesitate to create a new profile Using Outlook 3
G Can't create Folder Groups in Outlook 2013 Using Outlook 0
N Outlook rules don't create a copy for bcc'ed emails Using Outlook 3
F Delete/create/reset Exchange mailbox on Outlook.com Using Outlook.com accounts in Outlook 3
R Can not create folder to store specific emails in in Outlook for Mac Using Outlook 1
W Create Search Folder excluding Specific Email Addresses Using Outlook 5
A Outlook macro to create search folder with mail categories as criteria Outlook VBA and Custom Forms 3
K VBA BeforeItemMove event create rule to always move to its folder. Outlook VBA and Custom Forms 4
JackBlack What tools do you use to create the signature for email? Using Outlook 3
Rupert Dragwater How to create a new email with @outlook.com Using Outlook.com accounts in Outlook 32
F Should a new email account also create new contacts Using Outlook 2
D create an html table in outlook custom form 2010 using vba in MsAccess Outlook VBA and Custom Forms 7
R Outlook add-in to create new contact from an email. Using Outlook 0
Tanja Östrand Outlook 2016 - Create Macro button to add text in Subject Outlook VBA and Custom Forms 1
Q Script to create a pst file for Archiving Using Outlook 1
Jennifer Murphy Can I create a Rule with Or'd conditions? Using Outlook 1
D Outlook macros to create meeting on shared calendar Outlook VBA and Custom Forms 10
G How do I create a custom pick list in VB for an outlook automated email? Outlook VBA and Custom Forms 1
L Create Custom Form Using Outlook 0
Diane Poremsky Create a Task when a Message is Flagged New Slipstick.com Articles 0
Stilgar Relsik Create a rule to copy text from an email and paste it in the subject line. Using Outlook 1
Diane Poremsky Create a custom field for Outlook messages New Slipstick.com Articles 0
Mark White vba to create a shared mailbox folder Outlook VBA and Custom Forms 3
Similar threads


















































Top