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 Email address auto-completes work fine on laptop, but no longer on desktop Using Outlook 2
S Create Outlook Task from Template and append Body with Email Body Outlook VBA and Custom Forms 4
H Copying email address(es) in body of email and pasting in To field Outlook VBA and Custom Forms 1
A Search folder and move the email Outlook VBA and Custom Forms 0
P VBA to add email address to Outlook 365 rule Outlook VBA and Custom Forms 0
farrissf Outlook 2016 Optimizing Email Searches in Outlook 2016: Seeking Insights on Quick Search vs Advanced Search Features Using Outlook 0
D Delete selected text in outgoing email body Outlook VBA and Custom Forms 0
F Graphics in email / Mac recipient garbled Using Outlook 0
D Outlook VBA forward the selected email to the original sender’s email ID (including the email used in TO, CC Field) from the email chain Outlook VBA and Custom Forms 2
Witzker Outlook 2019 Macro to seach in all contact Folders for marked Email Adress Outlook VBA and Custom Forms 1
E Outlook 365 Save Selected Email Message as .msg File - oMail.Delete not working when SEARCH Outlook VBA and Custom Forms 0
S Email Macros to go to a SHARED Outlook mailbox Draft folder...NOT my personal Outlook Draft folder Using Outlook 2
R Outlook 365 VBA AUTO SEND WITH DELAY FOR EACH EMAIL Outlook VBA and Custom Forms 0
G Print email attachments when hit subfolder Outlook VBA and Custom Forms 1
C Spam Email? Using Outlook 2
G Automatically delete email when a condition is met Outlook VBA and Custom Forms 1
E Save Selected Email Message as .msg File - digitally sign email doesn't works Outlook VBA and Custom Forms 1
S Email was migrated from GoDaddy to Microsoft exchange. We lost IMAP ability Exchange Server Administration 1
R Outlook 365 How to integrate a third-party app with Outlook to track email and sms? Using Outlook 2
S Paperclip icon shows without attachment in email under Sent folder Using Outlook 0
B Outlook 2019 Automatically move email after assigning category Using Outlook 4
Rupert Dragwater How to permanently remove an email address Using Outlook 9

Similar threads

Back
Top