Temporarily Exclude sender ABC from distribution list

  • Thread starter Thread starter מיכ×ל (מיקי) ×בידן®
  • Start date Start date
×

מיכ×ל (מיקי) ×בידן®

Hi,

I am looking for some code that will do the following:

Assume I got a Mail Message from one of my recipients, ABC.
(Recipient ABC is one of many recipients located in my "Friends -
Distribution List").

I want to forward this mail to all the recipient, who are part of that
Distribution List (selecting the "Friends - Distribution List" in the BCC -
but I DO NOT want ABC to get this forwarded mail (no need to - as he is the
original sender of it).

In other words - a VBA code that will do some kind of "ResolveAll" in the
BCC line > browse the listed recipients and delete the one from whom I have
got this mail.
(If I choose another DL and the original sender is not a part of it - the
Code will browse and do nothing)

Can this be accomplished ?

(As I am not familiar with Outlook VBA - please try to reply with a Macro
and/or direct me to some link(s) where I can find such.

Thanks in advance and have a nice weekend.
Michael
 
Am I missing something ?
Is this the correct Discussion Group for questions like mine !?
I saw, here, a few MVPs from whom I would expect some answer.
(I am old enough to cope with an answer that states that my request CANNOT
be accomplished).
Thank you.
 
You cannot expand a DL using code, you can iterate it for Members and
collect each Member's information, remove the DL and then add back each
Recipient that you want.

Speaking only for myself I try not to answer posts where the poster asks for
code to be supplied rather than information or a snippet. If the poster
doesn't appear interested in learning what's needed but just wants something
supplied for them it's not something I want to get involved with. I follow a
"teach a man to fish, don't just give them a fish" policy generally.
 
Thank you.

Ken Slovak - said:
You cannot expand a DL using code, you can iterate it for Members and
collect each Member's information, remove the DL and then add back each
Recipient that you want.

Speaking only for myself I try not to answer posts where the poster asks for
code to be supplied rather than information or a snippet. If the poster
doesn't appear interested in learning what's needed but just wants something
supplied for them it's not something I want to get involved with. I follow a
"teach a man to fish, don't just give them a fish" policy generally.
 
After visiting YOUR site I saw there some ready-made codes.
They' definitely, don't look like "Fishing Angles" but rather like "Fishes"
(after being cleaned and grilled).
However, if you will let me know how to add the reference to the CDO and how
to put the DL members into a Temporary String variable (instead of a "Word"
document) I might be able to run a loop the will compare each DL member
against the sender and when a identity is found - delete the sender from that
temp. variable and then return all the members, from within the Temp. String
back to the To or BC or BCC line.
Thanks again (btw. I hate fish).
Michael
 
CDO 1.21 is an optional installation for Office and must be installed as an
optional component from the Office CD. You can then set a project reference
to CDO 1.21 (CDO.DLL), which will show up as MAPI in the references. For
Outlook 2007 you must download CDO 1.21 from the MS Web site.

However, CDO is very security limited when it comes to anything to do with
email addresses or possible ways of harvesting email addresses. Most of the
CDO samples I have on my Web site were posted prior to that security
implementation. So if you use CDO you will get security prompts.

The DLToWord procedure I have on my Web site doesn't use CDO by the way.
That code also pulls a DL from the currently selected item or items in a
folder, not from a specific email item. However, you can substitute
ActiveInspector.CurrentItem for the Explorer.Selection collection.

Leaving out the Word stuff the meat is in these lines:

Set objRecipient = objDL.GetMember(lngIndex)

'Get the name of the list member.
strName = objRecipient.Name

'Get the e-mail address of the list member.
strAddress = objRecipient.Address

strAddress and strName then have the address and name of the DL member. You
can test each of those as you iterate the loop and put the results into
temporary strings if you want.
 
Thanks a lot, Ken,
Your last reply tasted like a luxury portion of Shrimps Cocktail !!!
I'll give it a try during the coming weekend.
 
Back
Top