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
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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.
 

Peter Thompson

New Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
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.

:)
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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
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
N Syncing my inbox not working for certain types of mail Using Outlook 9
A rules (flags) not working Using Outlook 7
P Outlook search is not working at all for Calendar & Tasks Using Outlook 7
D Delay Send not working Using Outlook 3
B Search function in Office 365 has stopped working Using Outlook 3
A rule to flag messages not working Using Outlook 5
R When rules are working but invisible and unmanageable Using Outlook 2
C Hyperlinks not working in Outlook Using Outlook 2
M Blocked Sender List @Domain Not Working Using Outlook 0
S Outlook.com Sync working, Sync to Android has issues Using Outlook.com accounts in Outlook 1

Similar threads

Top