Inserting Additional Email Address

Status
Not open for further replies.

WorkMC

Member
Outlook version
Outlook 2010 32 bit
Email Account
This is a two part question, firstly I've setup some buttons on a ribbon in which I can insert the e-mail addresses I want to use, some will have more than one e-mail recipient. However, what ever is already in the cc box is over written, with the e-mail address that is being pressed.

With objItem
.To = EmailTo
.CC = "JoeBloggs@anywhere.com"
End With

The code above is what I'm using, is there away to append it to the cc box rather than overwrite what is already there.

Secondly, if I click the To button on the e-mail, then a list of addresses can be found, if I search for my local address book and select a specific contact group, this is added to the e-mail. Is it possible to have a macro that will select my local address book so that I can name the groups in the macro and they automatically inserted into the To box?

Hopefully, this will be the last question for the foreseeable future.
 

WorkMC

Member
Outlook version
Outlook 2010 32 bit
Email Account
This is a two part question, firstly I've setup some buttons on a ribbon in which I can insert the e-mail addresses I want to use, some will have more than one e-mail recipient. However, what ever is already in the cc box is over written, with the e-mail address that is being pressed.

With objItem
.To = EmailTo
.CC = "JoeBloggs@anywhere.com"
End With

The code above is what I'm using, is there away to append it to the cc box rather than overwrite what is already there.

Secondly, if I click the To button on the e-mail, then a list of addresses can be found, if I search for my local address book and select a specific contact group, this is added to the e-mail. Is it possible to have a macro that will select my local address book so that I can name the groups in the macro and they automatically inserted into the To box?

Hopefully, this will be the last question for the foreseeable future.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
you need to use recipients.add (address) and recipients.type olcc to add names.

Dim objRecip As Recipient
Set objRecip= objitem.Recipients.Add("alias@address")
objRecip.Type = olCC ' olTo or olBCC
objRecip.Resolve ' (usually not required if using email address)
 

WorkMC

Member
Outlook version
Outlook 2010 32 bit
Email Account
OK, solved the first part but not the second when trying t
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Secondly, if I click the To button on the e-mail, then a list of addresses can be found, if I search for my local address book and select a specific contact group, this is added to the e-mail. Is it possible to have a macro that will select my local address book so that I can name the groups in the macro and they automatically inserted into the To box?

Oh, sorry, I missed this. (I'm terrible when it comes to multiple questions in one post - i almost always miss one).

it should work to add the name to the add line:

Set objRecip= objitem.Recipients.Add("group name")

you will likely need to resolve the name when you do this. Also, if the group name exists in both GAL and your local directly, you should rename the local copy or change the order of resolution so names are resolved to the local address book before it goes looking in the gal.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
Witzker Pls help to change the code for inserting date in Ol contact body Outlook VBA and Custom Forms 5
D Inserting sender name and address with vba Outlook VBA and Custom Forms 1
G Message template / custom forms and VBA Help needed - inserting info into table Outlook VBA and Custom Forms 3
D Using Libraries when inserting a file in Outlook 2013 Using Outlook 1
L Inserting a PPT/PDF into the message body Using Outlook 1
B Outlook 2007 - Slow opening folders when inserting attachments Using Outlook 2
S Inserting Dates With Quick Parts (or Macros) Using Outlook 4
L Block others from inserting appointments in your calendar Using Outlook 3
W inserting activeX/user control into form Outlook VBA and Custom Forms 1
H C# inserting word document with formatting into outlook message Outlook VBA and Custom Forms 1
R Inserting a hyperlink in the bod of an outlook appt. Outlook VBA and Custom Forms 13
K Inserting text from a macro Outlook VBA and Custom Forms 1
S Outlook 2016 Arrange tasks by date, additional custom sorting, but still use friendly terms like Today, Tomorrow, This week? Using Outlook 1
R Copy additional IMAP accounts into Oulook 365 Account Exchange Server Administration 4
D Create additional custom flag descriptions (other than Send E-Mail, Call etc.) Using Outlook 1
S VBA to modify appointment item in additional Exchange account doesn't work Using Outlook 0
W How to export additional fields in contacts Using Outlook 1
B Sharing Additional Calendars Using Outlook 1
B Searching OWA Additional Mailbox - in which Secondary folder is the email? Using Outlook 1
J “additional” mailbox cannot be removed from an Outlook 2007 client’s mailbox Exchange Server Administration 1
T Changing default reminder time for all day events - additional help needed Using Outlook 1
T OL 2010 Additional and Seperate Contacts/Address books. Using Outlook 12
U Cached mode additional mailboxes Using Outlook 2
A Copying additional contact fields when chosing "Contact from the same company" Using Outlook 5
B Populating Additional Outlook Column with Date \ Time Using Outlook 0
C Include additional contact folders in user's Outlook Address Book centrally by Exchange Server Administration 4
L outlook additional mailbox's files Outlook VBA and Custom Forms 1
L How add additional addressess Outlook VBA and Custom Forms 2
F Add a category before "Send an Email When You Add an Appointment to Your Calendar" Outlook VBA and Custom Forms 0
T Problem when requesting to view an email in a browser Using Outlook 0
J Outlook 365 Forward Email Subject to my inbox when new email arrive in shared inbox Using Outlook 0
HarvMan Archive Email Manually Using Outlook 0
L Fetch, edit and forward an email with VBA outlook Outlook VBA and Custom Forms 2
S New Email "From" box stopped working Using Outlook 0
Rupert Dragwater Duplicate email in Folder Using Outlook 7
M "Attachment Detacher for Outlook" add in, does it update the server copy of the email? Using Outlook 1
W Outlook 365 I am getting the "Either there is no default mail client" error when I try to send an email on excel Office 365 Using Outlook 1
MattC Changing the font of an email with VBA Outlook VBA and Custom Forms 0
L Specific Incoming Email Address Immediately Deleted Using Outlook 2
Witzker Outlook 2019 Macro to send an Email Template from User Defined Contact Form Outlook VBA and Custom Forms 0
Witzker Outlook 2019 Edit contact from email does not open the user defined contactform Using Outlook 3
V Macro to mark email with a Category Outlook VBA and Custom Forms 4
R Roadrunner Email Settings | Contact Roadrunner Customer Support Outlook VBA and Custom Forms 1
D Gmail mail is being delivered to a different email inbox in Outlook App 2021 Using Outlook 2
Albert McCann Outlook 2021 Outlook Display of HTML Email from two senders is glitchy Using Outlook 0
A How Do I Setup My Optonline.Net Email Account? Outlook VBA and Custom Forms 1
H Preventing the 'email address fetch from Exchange' crashing email reading code Exchange Server Administration 0
D multiple email accounts - why do I have to choose the "from" account address?? Using Outlook 2
Wotme create email only data file Using Outlook 1
F Outlook 2016 Email with attachments not being received Using Outlook 3

Similar threads

Top