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
C Outlook 2007 Removing then adding account restores junk email processing Using Outlook 0
G Place jpg in body of email Outlook VBA and Custom Forms 1
F Wishlist Outlook suddenly began synchronizing deleted items every time I delete a single email. Using Outlook 2
N Save Selected Email Message as .msg File Outlook VBA and Custom Forms 12
HarvMan Toggle between calendar and email in Outlook 365 Using Outlook 7
F Email being marked as Spam by Gmail and not being visible in Outlook Using Outlook 5
G Email time stamp Using Outlook 2
G Schedule recurring email and attachments display Outlook VBA and Custom Forms 3
G Save and Rename Outlook Email Attachments Outlook VBA and Custom Forms 0
B Need to Copy an email to a subfolder Outlook VBA and Custom Forms 2
M How to setup outlook after importing old account information - Entering email account info creates with "(1)" after the account! Using Outlook 1
K Multiple Rules on Single Email Using Outlook 2
F VBA to move email from Non Default folder to Sub folders as per details given in excel file Outlook VBA and Custom Forms 11
e_a_g_l_e_p_i Outlook 2010 How to set default email address for website links Using Outlook 3
O Same email address, same person, names in so many ways Using Outlook 4
D Create new email from the received Email Body with attachment Outlook VBA and Custom Forms 10
D Outlook launch email showing new unread email in reading pane Using Outlook 11
B Zoom automatically next email item (VBA) Outlook VBA and Custom Forms 2
K Outlook adds space to rows in HTML email signatures viewed on mobile Using Outlook 1
M HTML email signature in Outlook Using Outlook 3
M Respond to Outlook Email Outlook VBA and Custom Forms 0
U Outlook locking up when replying to Email Using Outlook 7

Similar threads

Top