Working with Contact Groups as Addressees

Status
Not open for further replies.

Peter Thompson

New Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
I am working on a VBA project that scans outgoing emails for events that may breach good email ettiquette (such as not attaching something, replying to all, use of bad language etc).

One aspect is to review the addressee list and count internal and external recipients based on domain name. I struggle with this when the addressee entry is a Contact Group (which I first need t identify and then expand).

If I just have one addressee which is a contact group, my item.recipients.count is 1.. Even though there could be any number in the group.

Ideas or suggestions?

Thanks
 
Is it an exchange DL or Outlook Contact Group? I'm not sure it makes a difference... but was thinking you could do a look up and check the message class. Or get the recipients email address - an outlook contact group won't have an address.
 
Thanks for the prompt response.

In this case its an Outlook Contact Group, although I'm sure that somewhere along the way I will run into Exchange DLs.

I'm not following getting a recipients email address as the outlook contact group won't have one?

I've created a short (3 addressees) contact group in Outlook. Each has a fully domain qualified address. Opening the Contacts pane, I've located the group and right clicked to Create > Email and the To... field is populated with a compacted icon (square with a plus inside) and the name of the contact group.

If I click send, my code does not expand the list and check and count the number of true recipients (it says 1 instead of the 3 I know are in there).

However if I expand the group before sending, it works fine because now the addressee list is shown as a collection of individuals, the domains of which can be checked.

So my quest is to take all of the addresseess and check each one for a domain. If a domain does not exist, to assume that it is a distribution/contact list and to grab that and check all the individual members domains.

:)
 
So my quest is to take all of the addresseess and check each one for a domain. If a domain does not exist, to assume that it is a distribution/contact list and to grab that and check all the individual members domains.
Correct, at least that is my theory. It might not work in real life.... the other option would be to expand (or attempt to expand) all recipients before counting.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
L Outlook 2007 Contact Form Code Not Working Using Outlook 20
H Custom Contact form not working in Outlook 2003 Using Outlook 3
R Look up Contact not working Using Outlook 2
V Type a contact to find NOT WORKING properly? Using Outlook 2
C Outlook Business Contact Manager Beta Not Working BCM (Business Contact Manager) 2
T Outlook 365 won't take new working password Using Outlook 0
E Outlook 365 Save Selected Email Message as .msg File - oMail.Delete not working when SEARCH Outlook VBA and Custom Forms 0
Z Outlook 2021 Outlook new emails notification not working Using Outlook 4
A Outlook 365 Outlook (part of 365) now working offline - argh Using Outlook 5
G LinkedIn tab missing in Outlook 365 (but working in OWA) Using Outlook 0
BartH VBA no longer working in Outlook Outlook VBA and Custom Forms 1
S New Email "From" box stopped working Using Outlook 0
R Outlook Working off line Using Outlook 0
H How to Fix 1510-370-1986 Garmin GPS Not Working Outlook VBA and Custom Forms 0
M Outlook 2019 Macro not working Outlook VBA and Custom Forms 0
L Outlook 365 Outlook not working on linux how to solve it Using Outlook.com accounts in Outlook 0
Z Outlook.com OST Stopped working without explanation Using Outlook.com accounts in Outlook 3
Commodore Automatic switch between working offline/online Using Outlook 4
V Outlook 2016 iCloud for Windows - Why no working Calendars and Tasks ? Using Outlook 1
S HTML Code Embedded in String Within Open Outlook Email Preventing Replace(Application.ActiveInspector.CurrentItem.HTMLBody From Working Outlook VBA and Custom Forms 4
G print attachment straight away; working script edit not working Outlook VBA and Custom Forms 0
V Auto-complete stopped working Using Outlook 4
F Searches are not working properly Using Outlook 1
Jennifer Murphy Spam filter not working Using Outlook 13
D Connecting Gmail to Outlook 365 - My Setup not working Using Outlook 2
A Prepending Email Addrs with "Display Name <email>" Has Stopped Working Using Outlook 0
R rules not working - done troubleshooting Using Outlook 0
R Follow up button doesn't working neither the reminders in BCM BCM (Business Contact Manager) 0
A calendar invites sent from Microsoft Outlook to Mac Outlook is not working Using Outlook 2
Z Task Filter Not Working When I add too many criteria Using Outlook 0
D iCloud Add-in not working in Outlook 2013 and Outlook 2016 After Windows Upgrade & iCloud Upgrade Using Outlook 2
bmtjedi Set objApp = Application Not Working in O365-32bit Using Outlook 1
B Outlook 2003 email sending & receiving suddenly stopped working Using Outlook 3
S Outlook Custom Form Scripting only working when clicking on "Run this form" Outlook VBA and Custom Forms 2
K Outlook 2016 - controlling IMAP OST size with Group Policy not working Using Outlook 1
F KB4475563 stops VBS at forms working Outlook VBA and Custom Forms 3
J Copy to calendar function no longer working in outlook 365 Using Outlook 5
D Archive by receive date not working Using Outlook 2
M move to iCloud not working in outlook calendar Using Outlook 12
cricket1001 Shade non-working days in calendar Using Outlook 0
L Outlook 2019 MAC sync error after working for 4 hours Using Outlook 1
A rules not working Using Outlook 2
B Reply and replyall macro is not working Outlook VBA and Custom Forms 1
D Any updates or fixes that would make this code stop working just moving emails to another folder Outlook VBA and Custom Forms 1
V Autocomplete not working on new email account Using Outlook 4
P Two main Outlook gripes: Voting buttons not working externally nor Focused Inbox Using Outlook 1
M email search not working Using Outlook 1
B When working on emails in a certain folder, when I hit reply or reply all, I would like it re always reply all and add an email address to send to Outlook VBA and Custom Forms 3
J Menus not working BCM (Business Contact Manager) 7
K Working with Explorer.Close event Outlook VBA and Custom Forms 3

Similar threads

Back
Top