Warning when sending to a Distribution List

  • Thread starter Thread starter xman
  • Start date Start date
X

xman

At my work, I and other sometimes, by accident, send mail to
Distribution-list, which shouldn't have been.

I've been trying to find some VBA code, which could issue a warning
after pressing Send;

Something like: "You're sending this mail to more than one recipient -
are you sure?"

Maybe the code could be refined only to ask if more than x recipients
are in the DL.

I made some code that could count the recipient in the To box, but how
to get about counting or even recognizing DL from code is beyond me.

I'm a newbie in OL VBA and the object model is therefore rather
unfamiliar to me.

Anyone got a hint or a code example?
 
I think the code should take care of both situations... Don't you :)

I (and others) use both, but of course the biggest comes from our Exhange
envrionment.

Xman

Sue Mosher said:
Outlook version? Personal or Exchange DLs or both?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
...cut
 
You still didn't tell us your Outlook version. It matters a lot with regard
to security prompts.

Also note: The newsgroup interface you are using apparently does not quote
earlier messages in the thread, making your latest message so short on
detail that you risk not getting the answer you're looking for. Please take
the time to quote the original message. At this point, I really don't know
what it was.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Sorry I use outlook 2003 and outlook xp. At work i'm using Off.XP in
Exchange Environment - at home Off.2003.



Original question is here:

At my work, I and other sometimes, by accident, send mail to
Distribution-list, which shouldn't have been.

I've been trying to find some VBA code, which could issue a warning
after pressing Send;

Something like: "You're sending this mail to more than one recipient -
are you sure?"

Maybe the code could be refined only to ask if more than x recipients
are in the DL.

I made some code that could count the recipient in the To box, but how
to get about counting or even recognizing DL from code is beyond me.

I'm a newbie in OL VBA and the object model is therefore rather
unfamiliar to me.

Anyone got a hint or a code example?
 
Take a look at the sample at
http://www.outlookcode.com/codedetail.aspx?id=742. It should do pretty much
what you want -- checked not just Recipients.Count but the number of members
of each DL. It also gives you an option as to whether you want to include
Bcc recipients in the maximum count. Note that it will trigger security
prompts in Outlook 2002.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



xman said:
Sorry I use outlook 2003 and outlook xp. At work i'm using Off.XP in
Exchange Environment - at home Off.2003.



Original question is here:

At my work, I and other sometimes, by accident, send mail to
Distribution-list, which shouldn't have been.

I've been trying to find some VBA code, which could issue a warning
after pressing Send;

Something like: "You're sending this mail to more than one recipient -
are you sure?"

Maybe the code could be refined only to ask if more than x recipients
are in the DL.

I made some code that could count the recipient in the To box, but how
to get about counting or even recognizing DL from code is beyond me.

I'm a newbie in OL VBA and the object model is therefore rather
unfamiliar to me.

Anyone got a hint or a code example?



Sue Mosher said:
You still didn't tell us your Outlook version. It matters a lot with
regard to security prompts.


xman said:
I think the code should take care of both situations... Don't you :)

I (and others) use both, but of course the biggest comes from our
Exhange envrionment.

Xman

"Sue Mosher [MVP-Outlook]" <[email protected]> skrev i en
meddelelse Outlook version? Personal or Exchange DLs or both?
 
Back
Top