[mso] Re: Outlook 2003, Distribution Lists and Categories

  • From: "Tommy Armstrong" <tfa@xxxxxxxxxxxxxxxxx>
  • To: <mso@xxxxxxxxxxxxx>
  • Date: Mon, 8 May 2006 19:40:39 -0400

Awesome, I had done something similar in an Access Database Application =
to
be able to send Word and email messages based on categories, but never
explored it Outlook Object Model well enough for
" myMailItem.ShowCategoriesDialog"=20
That makes it easy.=20

Now one could easily insert a file dialog box to select a word letter,
picture, etc and send as an attachment or copy the contents of the =
letter
into the email message.=20

Its amazing to me how simple it is to get something done when looking at =
it
in the right way like you did--I am amazed that this is not built into
Outlook. Simple and elegant. Good job and thanks.=20

Now just one other question, how can we now that have all these names =
being
sent the letter hide the recipients names so they do not know who else =
is
also receiving the letter. Is there a simple property that can be set?


Tommy Armstrong
PO Box 484=20
Lillington, NC   27546
http://www.brickengraver.com
=20
The search is what anyone would undertake if he were not sunk in the
everydayness of his own life. To become aware of the possibility of the
search is to be onto something. Not to be onto something is to be in
despair.=20
=20
Walker Percy




=20

> -----Original Message-----
> From: mso-bounce@xxxxxxxxxxxxx=20
> [mailto:mso-bounce@xxxxxxxxxxxxx] On Behalf Of Thomas Hutchins
> Sent: Monday, May 08, 2006 5:33 PM
> To: mso@xxxxxxxxxxxxx
> Subject: [mso] Re: Outlook 2003, Distribution Lists and Categories
>=20
> The following macro creates an email, then pops up a category=20
> selection dialog. After you select one or more categories, it=20
> searches through your Outlook contacts. Every contact who has=20
> a category you selected is added to the recipient list.
>   =20
>   I'm sure someone who is more familiar than I with Outlook=20
> VBA can improve this considerably. Although I have done lots=20
> of VBA development in Excel & Access, I have never written a=20
> single macro for Outlook - until today.=20
>   =20
>   Sub EmailFromCatg()
>     Dim myOlApp As Outlook.Application
>     Dim myMailItem As Outlook.MailItem
>     Dim myNamespace As Outlook.NameSpace
>     Dim myContacts As Outlook.Items
>     Dim myItem As Outlook.ContactItem
>     Dim SelCatg As String
> 'Creates an instance of the application
>     Set myOlApp =3D Outlook.Application
> 'Creates appointment item
>     Set myMailItem =3D myOlApp.CreateItem(olMailItem)
>     myMailItem.Body =3D "Your Ad Here"
>     myMailItem.Recipients.Add ("Thomas Hutchins")
>     myMailItem.Subject =3D "TBD"
> 'Display the Show Categories dialog box
>     myMailItem.ShowCategoriesDialog
>     SelCatg$ =3D myMailItem.Categories
> 'Display the appointment
>     myMailItem.Display
> 'Go through all my contacts. If any have the category(s) I=20
> just selected, 'add that person to the recipient list.
>     Set myNamespace =3D myOlApp.GetNamespace("MAPI")
>     Set myContacts =3D=20
> myNamespace.GetDefaultFolder(olFolderContacts).Items
>     For Each myItem In myContacts
>         If (myItem.Class =3D olContact) Then
>             If InStr(SelCatg$, myItem.Categories) Then
>                 myMailItem.Recipients.Add (myItem.Email1Address)
>             End If
>         End If
>     Next
> End Sub
>   =20
>   Hope this is helpful,
>   =20
>   Hutch
>  =20
> "James S. Huggins (MSO)" <MicrosoftOffice@xxxxxxxxx> wrote:
>  =20
> I have a number of entries in my address book/contact list=20
> which share a common "category".
>=20
> I need to send an email to all of these people.
>=20
> Is there a way to create a distribution list and then easily=20
> tell Outlook to add all these people to that distribution list?
>=20
>=20
> As a more general question ...=20
> If I open my contacts folder and then do a find category or=20
> other criteria, is there an easy way add these people to a=20
> distribution list?
>=20
> Or, is there an easy way to send them all an email WITHOUT=20
> adding them to a distribution list?
>=20
>=20
>=20
> James S. Huggins
>=20
>=20
>=20
> ...=20
>=20
> *************************************************************
> You are receiving this mail because you subscribed to=20
> mso@xxxxxxxxxxxxx or MicrosoftOffice@xxxxxxxxxxxxxxxx
>=20
> To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
>=20
> To Unsubscribe from this group, visit the group's homepage=20
> and use the dropdown menu at the top. This will allow you to=20
> unsubscribe your email address or change your email settings=20
> to digest or vacation (no mail).
> //www.freelists.org/webpage/mso
>=20
> To be able to use the files section for sharing files with=20
> the group, send a request to mso-moderators@xxxxxxxxxxxxx and=20
> you will be sent an invitation with instructions. Once you=20
> are a member of the files group, you can go here to=20
> upload/download files:
> http://www.smartgroups.com/vault/msofiles
>=20
> If you are using Outlook and you see a lot of unnecessary=20
> code in your email messages, read these instructions that=20
> explain why and how to fix it:
> http://personal-computer-tutor.com/abc3/v28/greg28.htm
> *************************************************************
>=20
>=20
>       =09
> ---------------------------------
> Love cheap thrills? Enjoy PC-to-Phone  calls to 30+ countries=20
> for just 2=A2/min with Yahoo! Messenger with Voice.
>       =09
> ---------------------------------
> Love cheap thrills? Enjoy PC-to-Phone  calls to 30+ countries=20
> for just 2=A2/min with Yahoo! Messenger with Voice.
>=20
> *************************************************************
> You are receiving this mail because you subscribed to=20
> mso@xxxxxxxxxxxxx or MicrosoftOffice@xxxxxxxxxxxxxxxx
>=20
> To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
>=20
> To Unsubscribe from this group, visit the group's homepage=20
> and use the dropdown menu at the top.  This will allow you to=20
> unsubscribe your email address or change your email settings=20
> to digest or vacation (no mail).
> //www.freelists.org/webpage/mso
>=20
> To be able to use the files section for sharing files with=20
> the group, send a request to mso-moderators@xxxxxxxxxxxxx and=20
> you will be sent an invitation with instructions.  Once you=20
> are a member of the files group, you can go here to=20
> upload/download files:
> http://www.smartgroups.com/vault/msofiles
>=20
> If you are using Outlook and you see a lot of unnecessary=20
> code in your email messages, read these instructions that=20
> explain why and how to fix it:
> http://personal-computer-tutor.com/abc3/v28/greg28.htm
> *************************************************************

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, visit the group's homepage and use the dropdown 
menu at the top.  This will allow you to unsubscribe your email address or 
change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles

If you are using Outlook and you see a lot of unnecessary code in your email 
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************

Other related posts: