How can the sender's email address be extracted from all emails stored in the Inbox folder of Outlook 2002? Apparently most VBA for Outlook code won't compatible with VBscript.
Without VBScript, the sender's address can still be extracted by Macro Scheduler script, but it takes a long time.
I'll be grateful for your help.
Senders' Address in Outlook 2002 Inbox
Moderators: JRL, Dorian (MJT support)
Export all mails from the inbox folder to a file e.g. C:\InboxContent.txt
Search for "From:"
Take result/lines from MailFrom.txt
Extract sender from line
Sample - InboxContent.txt
-----Original Message-----
From: [email protected]
Sent: 09 October 2002 16:44
To: [email protected]
Subject: HongKong in spring
Hi Mao,
maybe we should visit Hong Kong next spring.
Rgds,
John
-----Original Message-----
...
Search for "From:"
Code: Select all
Run Program>cmd /c find "From:" C:\InboxContent.txt > C:\MailFrom.txt
Extract sender from line
Code: Select all
ReadLn>...,from
Length>from,fromlength
Sub>fromlength,6
MidStr>from,7,fromlength,sender
Message>%sender%
Sample - InboxContent.txt
-----Original Message-----
From: [email protected]
Sent: 09 October 2002 16:44
To: [email protected]
Subject: HongKong in spring
Hi Mao,
maybe we should visit Hong Kong next spring.
Rgds,
John
-----Original Message-----
...
Hi Lumumba,
Thanks for your very kind assistance. Sorry for not being able to reply your post earlier. Actually I already wrote a MacroScript to extract senders' email address. My algorithm was quite simple. First, it simulates a dummy reply. Second, it extracts the Reply To email address. Then, the process is repeated until all emails exhaust. Surprisingly, the speed is reasonably acceptable, even for thousands of emails.
On the other hand, your algorithm involves huge amount of text read/write. It's hardly practical for a large number of emails.
Again, thanks for your help.
Thanks for your very kind assistance. Sorry for not being able to reply your post earlier. Actually I already wrote a MacroScript to extract senders' email address. My algorithm was quite simple. First, it simulates a dummy reply. Second, it extracts the Reply To email address. Then, the process is repeated until all emails exhaust. Surprisingly, the speed is reasonably acceptable, even for thousands of emails.
On the other hand, your algorithm involves huge amount of text read/write. It's hardly practical for a large number of emails.
Again, thanks for your help.
Hi Lumumba,
Now I can see the advantage of converting all emails into a text file format. In order for a MacroScript to run free of glitches, in most cases we shouldn't touch the keyboard until it's finished. Hence, my aglorithm can't work in the background like yours. In addition, I concede that your algorithm will win the speed contest because no time-consuming GUI is involved. Thank for illuminating a wonderful script idea.
Now I can see the advantage of converting all emails into a text file format. In order for a MacroScript to run free of glitches, in most cases we shouldn't touch the keyboard until it's finished. Hence, my aglorithm can't work in the background like yours. In addition, I concede that your algorithm will win the speed contest because no time-consuming GUI is involved. Thank for illuminating a wonderful script idea.