Its probably not what your users want, but it might help to move in the
right direction.....

Paste this code into a text file in Notepad, and save it as a .VBS file.
Then run it. (Change the file location from C:\Temp if you want...). Comment
out with a single quote mark any lines you don't want written to the file.
Get other field names to write out from the help system in Outlook, Tools,
Macro, Visual Basic Editor.

[START CODE]
set fso = wscript.createobject("Scripting.FileSystemObject")
set folder=fso.getFolder("C:\Temp")
Set OStream = fso.CreateTextFile("C:\temp\Addresses.txt")
OStream.writeLine "Addresses from Inbox"
OStream.writeLine "--------------------"
OStream.writeLine ""
'
mySpaces = ""
set OL = GetObject(,"OUTLOOK.APPLICATION")
set MAPI = OL.GetNamespace("MAPI")
Set myInBox = MAPI.GetDefaultFolder(6)
        mySpaces = mySpaces & "     "
        For each Msg in myInBox.Items
'Write the subject lines out
                OStream.writeLine mySpaces & Msg.Subject
                mySpaces = mySpaces & "     "
                For each Addr in Msg.Recipients
'Write out all the recipients
                        OStream.writeline mySpaces & Addr.address & " : " &
addr.name
                Next
                mySpaces = mySpaces & "     "
'Write out the sender
                OStream.writeline mySpaces & Msg.SenderName
                mySpaces = Left(mySpaces,len(mySpaces)-10)
        Next
        mySpaces = Left(mySpaces,len(mySpaces)-5)

MsgBox "Finished looking through the Inbox"
'Now close the output file
Set GAL = Nothing
Set MAPI = Nothing
set fso = nothing
set Folder = nothing
set oStream = Nothing
set Out=nothing
[END CODE]
-----Original Message-----
From: Chris Levis [mailto:[EMAIL PROTECTED]]
Sent: 27 November 2002 16:16
To: Exchange Discussions
Subject: Getting email addresses from Inbox


A user approached me and asked if there was a way he could get the email
addresses from all messages in his inbox.

I've never done anything programatically in OL, and I don't know if the
following is possible:
        For Each message In Inbox
                Get From: address
                Add From: address to a text file
        Next

This is in Outlook 2000.  Anyone point me to a good resource?

Thanks!





___________________________
Chris Levis
Applied Geographics, Inc.

_________________________________________________________________
List posting FAQ:       http://www.swinc.com/resource/exch_faq.htm
Archives:               http://www.swynk.com/sitesearch/search.asp
To unsubscribe:         mailto:[EMAIL PROTECTED]
Exchange List admin:    [EMAIL PROTECTED]

_________________________________________________________________
List posting FAQ:       http://www.swinc.com/resource/exch_faq.htm
Archives:               http://www.swynk.com/sitesearch/search.asp
To unsubscribe:         mailto:[EMAIL PROTECTED]
Exchange List admin:    [EMAIL PROTECTED]

Reply via email to