How to find email(s) with large number of recipients in To: field

G

Guest

I am trying to
1. Find all emails with greater than 10 recipients in the To: field in my
INBOX. (FYI - I am aware that the senders should have sent the emails with
the recipients in the BCC: field)
&
2. when I do find these emails I would like to extract the recipients full
email addresses as well as thier "display name"

Your help would be very much appreciated.
 
F

F. H. Muffman

roscelt said:
I am trying to
1. Find all emails with greater than 10 recipients in the To: field in my
INBOX. (FYI - I am aware that the senders should have sent the emails with
the recipients in the BCC: field)
&
2. when I do find these emails I would like to extract the recipients full
email addresses as well as thier "display name"


Well, out of the box, there's no way to do it, you'd need to do it in code.

Which would also mean saying what version of Outlook you're using. You'd
probably want to be at least a little comfortable working with code, and not
just trust the code someone gives you off the Internet with a set of
instructions. At least, I would expect anyone who didn't know me to be wary
of something I wrote.
 
G

Guest

Thank you for your reply FH,

Is your reply geared towards the Search requirement (Priority 1) or the
extraction of email data (Priority 2)? My version of Outlook is 2003 SP3.

Is there no way to carry out the Search without code? If code required where
does one look for a coder?

roscelt
 
F

F. H. Muffman

Is your reply geared towards the Search requirement (Priority 1) or the
extraction of email data (Priority 2)? My version of Outlook is 2003 SP3.

Both. Unless you wanted to do it by hand, of course.
Is there no way to carry out the Search without code?

Not that I can think of
If code required where
does one look for a coder?

I'd probably post over to microsoft.public.outlook.program_vba (or, since
you're using the webbased reader,
http://www.microsoft.com/communitie....aspx?dg=microsoft.public.outlook.program_vba)
and just say that you are not a coder in any way and would like to pay
someone to write code to do it for you. You might even get a volunteer to
do it for nothing.

I tried last night and got about 75% of the way there. I just have a
problem remembering how to append to a text file, rather than create a new
one.
 
F

F. H. Muffman

F. H. Muffman said:
Both. Unless you wanted to do it by hand, of course.


Not that I can think of


I'd probably post over to microsoft.public.outlook.program_vba (or, since
you're using the webbased reader,
http://www.microsoft.com/communitie....aspx?dg=microsoft.public.outlook.program_vba)
and just say that you are not a coder in any way and would like to pay
someone to write code to do it for you. You might even get a volunteer
to do it for nothing.

I tried last night and got about 75% of the way there. I just have a
problem remembering how to append to a text file, rather than create a new
one.


Aha. Finished it. If you have a tech-savvy friend, show them this thread,
and this code, and see if they think they'd know how to work with it,
otherwise, I'm not comfortable giving code help yet =)

Function Test()
Dim olAppSession As Outlook.NameSpace
Dim olInboxFolder As Outlook.MAPIFolder 'use MAPI to loop through folder

Set olAppSession = Application.Session
Set olInboxFolder = olAppSession.GetDefaultFolder(olFolderInbox)
Set objMessages = olInboxFolder.Items
Set objMessage = objMessages.GetFirst()

Do While Not objMessage Is Nothing
If objMessage.Recipients.Count > 9 Then
'9 can be changed to 10, or whatever number you want
For i = 1 To objMessage.Recipients.Count Step 1
Set objRecip = objMessage.Recipients.Item(i)
If Not objRecip Is Nothing Then
Call WriteStringToFile("CHANGETHIS", objRecip.Address & "," &
objRecip.Name)
'CHANGETHIS should be changed to a path/file that you have
read/write to
'the file doesn't need to exist.
End If
Next i
End If
Set objMessage = objMessages.GetNext()
Loop

Set olInboxFolder = Nothing
Set olAppSession = Nothing
End Function

Sub WriteStringToFile(pFileName As String, pString As String)

Dim FileNum As Integer
FileNum = FreeFile ' next file number
Open pFileName For Append As #FileNum ' creates the file if it doesn't exist
Print #FileNum, pString ' write information at the end of the text file
Close #FileNum ' close the file

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top