[mso] Re: Outlook 2003, Distribution Lists and Categories + Business Contact Manager

  • From: "GLENDA WELLS" <gwells58@xxxxxxx>
  • To: mso@xxxxxxxxxxxxx
  • Date: Tue, 09 May 2006 18:02:09 -0400

This is so very awesome.  I don't use categories consistently so can't use 
it but it is very slick. Way to go Thomas.  /g


>From: "Anne Robson" <anne.robson2@xxxxxxxxxxxxxx>
>Reply-To: mso@xxxxxxxxxxxxx
>To: <mso@xxxxxxxxxxxxx>
>Subject: [mso] Re: Outlook 2003, Distribution Lists and Categories + 
>Business Contact Manager
>Date: Tue, 9 May 2006 19:16:18 +0100
>
>This may be the answer I was seeking to a very similar question a few weeks
>ago!  So thanks Thomas.  Even if my brain is hurting at the thought of
>programming the macro :-S LOL!
>
>Business Contact Manager has never worked on my brand new machine with 
>brand
>new Office 2003.  It simply makes Outlook crash, so I've uninstalled it.
>Pity, cos it looked like it would be very useful.  I can't even get it to
>load up so that I can instal any fixes that *might* exist.  Does anybody
>know if there are any known issues or hardware/software conflicts that 
>might
>account for this?
>
>-----Original Message-----
>From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On Behalf
>Of Thomas Hutchins
>Sent: 09 May 2006 16:26
>To: mso@xxxxxxxxxxxxx
>Subject: [mso] Re: Outlook 2003, Distribution Lists and Categories
>
>Here's a revised version of the macro which puts all the recipients (except
>you) in the BCC list. Change the  myRecipient.Type = olBCC  line if you 
>want
>something else.
>
>   It also handles the fact that your contacts, your e-mail, or both could
>have multiple categories. It has a slight flaw, however: the last recipient
>is being added to the regular recipients list, not the BCC list. Not sure
>why. Hopefully some Outlook VBA guru can improve it.
>
>   I'm not sure the If..Then test   If (myItem.Class = olContact) Then  is
>really needed.
>
>   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 myRecipient
>     Dim SelCatg As String
>'Creates an instance of the application
>     Set myOlApp = Outlook.Application
>'Creates email item
>     Set myMailItem = myOlApp.CreateItem(olMailItem)
>     myMailItem.Body = "Your Ad Here"
>     myMailItem.Recipients.Add ("Thomas Hutchins")  'Replace with YOUR name
>     myMailItem.Subject = "TBD"
>'Display the Show Categories dialog box
>     myMailItem.ShowCategoriesDialog
>     SelCatg$ = myMailItem.Categories
>'Display the email
>     myMailItem.Display
>'Go through all my contacts. If any have the categories I just selected,
>'add that person to the BCC recipient list.
>     Set myNamespace = myOlApp.GetNamespace("MAPI")
>     Set myContacts = myNamespace.GetDefaultFolder(olFolderContacts).Items
>     For Each myItem In myContacts
>         If (myItem.Class = olContact) Then
>             If CompareCatg(SelCatg$, myItem.Categories) = True Then
>                 Set myRecipient =
>myMailItem.Recipients.Add(myItem.Email1Address)
>                 myRecipient.Type = olBCC
>             End If
>         End If
>     Next
>End Sub
>
>   Function CompareCatg(Catg1 As String, Catg2 As String) As Boolean
>'Looks for a common category in two Outlook objects, each of which could
>'have multiple categories assigned to it.
>     Dim CatgToTest As String, CurrPos As Long, NewPos As Long
>     CurrPos& = 0
>'Find each category in Catg1 and search for it in Catg2
>     Do While CurrPos& < Len(Catg1$)
>         NewPos& = InStr(CurrPos& + 1, Catg1$, ",")
>         If NewPos& > 0 Then
>             CatgToTest$ = Mid(Catg1$, CurrPos& + 1, (NewPos& - 1) -
>CurrPos&)
>             CurrPos& = NewPos&
>         Else
>             CatgToTest$ = Mid(Catg1$, CurrPos& + 1, Len(Catg1$) - 
>CurrPos&)
>             CurrPos& = Len(Catg1$)
>         End If
>'If the category from Catg1 (CatgToTest) is in Catg2, return TRUE & exit.
>         If InStr(Catg2$, CatgToTest$) > 0 Then
>             CompareCatg = True
>             Exit Function
>         End If
>     Loop
>'Didn't find any matching category. Return FALSE.
>     CompareCatg = False
>End Function
>
>   BTW, I'm using Outlook 2003.  Hope this helpful to somebody,
>
>   Hutch
>
>
>Tommy Armstrong <tfa@xxxxxxxxxxxxxxxxx> wrote:
>   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)" 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
>*************************************************************
>
>
>
>---------------------------------
>New Yahoo! Messenger with Voice. Call regular phones from your PC and save
>big.
>
>*************************************************************
>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
>*************************************************************
>
>
>
>--
>Internal Virus Database is out-of-date.
>Checked by AVG Free Edition.
>Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006
>
>
>--
>Internal Virus Database is out-of-date.
>Checked by AVG Free Edition.
>Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006
>
>
>--
>Internal Virus Database is out-of-date.
>Checked by AVG Free Edition.
>Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006
>
>
>*************************************************************
>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
>*************************************************************

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar ? get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

*************************************************************
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: