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.
 
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.
 
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)
 
OK, solved the first part but not the second when trying t
 
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
P Xfinity/Comcast email service stopping sometime in 2025 - warning Using Outlook 5
O Two identical email accounts in Offline Global Address List Using Outlook 2
H Spam email in Gmail not visible in Outlook Using Outlook 3
J Renegade spam URL line displayed in old local Outlook 365 email title Using Outlook 3
L Hide Selected Email Address from Address Book Using Outlook 5
Y QQ on Scheduled Delivery of an Email Using Outlook 0
T Replace Text in Email Subject Outlook VBA and Custom Forms 3
Rupert Dragwater Cannot reestablish gmail (email address) account in Outlook 365 Using Outlook 11
M Outlook 365 adding standard message in body of template email Outlook VBA and Custom Forms 3
E Create Rule to Forward Email if Subject Begins With Using Outlook 2
V iCloud For Windows v15.x - Missing Email Features ? Using Outlook 4
M Thunderbird email client - I wonder Using Outlook 1
D Outlook Desktop App Email Software Using Outlook 0
P Email and calendar entry text now shifts right about 3 tabs worth of space Using Outlook 1
J Outlook macro to run before email is being send Outlook VBA and Custom Forms 3
T Outlook 2010 Creating a email 'Group' in OL 2010 Using Outlook 2
D Send email from Outlook Alias using Mac? Using Outlook 0
T How to set Default FONT for Email composing ? Using Outlook 0
H Finding text in open email Outlook VBA and Custom Forms 12
T Why do Outlook Desktop 2021 tasks from my wife's email show up in my task pane? Using Outlook 2
A Opening a link from an email automatically Outlook VBA and Custom Forms 0
D Outlook 2021 New email reminder Using Outlook.com accounts in Outlook 1

Similar threads

Back
Top