Getting the SenderEmailAddress

  • Thread starter Thread starter Sue Mosher [MVP-Outlook]
  • Start date Start date
Im having a terrible time trying to get the SenderEmailAddress.
I have tried a variety of snippets from all over the web but I just cant
get it.
I use Outlook 2000.

I dont want to use redemption. And it appears all other solutions use this
thing called CDO. But my reading seems to indicated that I must be running
Exchange server to use or get this. I don't have Exchange or use it.

Could anyone either clarify or show me code that would in my situation.

Thanks.
 
If you want help with your code, you'll need to post it and indicate what specific statements are causing problems. For starters, the error message you're getting with the objMsg statement probably means exactly what it says -- that you have an empty objMsg object because haven't instantiated it yet.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Thank you for your response Sue. I had seen your code before on this and
made many many attempts to get it to work but alas I was unsuccessful..

With my new found info I searched around on set up and found the CDO under
Outlook.
Loaded it. Then made sure that it was referenced in the VBA Editor.

Sadly I still cannot seem to get it to work. I am not a programmer such as
you MVP's so excuse my ignorance. I have however created many macros etc
that work for me, (probably look like Frankenstein to you all.)


I looked at your code and while not very knowledgeable about functions etc
When I run it by using

Sub someting()
GetFromAddress (objMsg)
End Sub

It dies in your code at the line

strEntryID = objMsg.EntryID

Runtime error 424
Object Required

I tried checking
http://www.cdolive.com/code.htm
But could not see anything that fit my situation.

Im sure its got to do with Something that I didn't Declare or An inspector
one of those mysterious things of its ilk . These Preamble things in code
are difficult to sort through for me.
How would I get your code kick started. (Windows 2000 Outlook 2000)

Or even more simpler code (if possible) that can be plugged into what Im
doing.

Regards


You do not need to be using Exchange in order to use CDO. You must, however,
install CDO, which is an optional component available during Outlook setup.
Sample code is available at
http://www.outlookcode.com/d/code/getsenderaddy.htm
 
Back
Top