Link to home
Start Free TrialLog in
Avatar of agrafixx
agrafixx

asked on

Add contact name, phone, and address to subject when scheduling appointment

Hello,

I am using the below code to Add contact name, phone, and address to subject when scheduling appointments outlook.  Would some please tell me how to put spaces or dases between each of the entries?




Sub MakeAppointment()
    Dim olkAppointment As Outlook.AppointmentItem, _
        olkContact As Outlook.ContactItem
    Set olkContact = Application.ActiveExplorer.Selection.Item(1)
    Set olkAppointment = Application.CreateItem(olAppointmentItem)
    olkAppointment.Location = olkContact.BusinessAddressCity
    olkAppointment.Subject = olkContact.HomeTelephoneNumber & olkContact.BusinessTelephoneNumber & olkContact.FullName & olkContact.HomeAddress & (olkContact.BusinessAddress)
    olkAppointment.Links.Add olkContact
    olkAppointment.Display
    Set olkContact = Nothing
End Sub
ASKER CERTIFIED SOLUTION
Avatar of Wayne Taylor (webtubbs)
Wayne Taylor (webtubbs)
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial