View Single Post
  #9  
Old May 17th 07, 03:20 AM posted to microsoft.public.outlook.program_vba
Mark Ivey
external usenet poster
 
Posts: 15
Default SenderName Value

Greg,

I appreciate your feedback, but I wasn't planning on saving the email to a
file outside of Outlook.

My plan is to be able to select one or more emails and click on a button (to
fire a macro) and have these emails sent to their appropriate backup folder
in my Personal folder list. For example:

If I select and email from John Brown, and then click on this button. I
would expect this email to be moved to my personal folder "2007" and into a
subfolder labeled "John Brown".

If someone has already invented the wheel with respect to what I am needing,
I would greatly appreciate some code snippets (VBA preferably).

TIA...

Mark Ivey

"Greg" wrote in message
...
On Wed, 16 May 2007 17:41:52 -0500, "Mark Ivey"
wrote:

Is there a way to get the SenderName Value via code?

From what I can tell, this is trapped behind some of the security features
in Outlook.

I am wanting to reference this value so I can utilize it in an effort to
make an archiving macro.

Any help is greatly appreciated.

Mark Ivey


There is a very easy way to do this.

Just save the email message to a file. There will be a line in the
file "Sender: Fred J. Muggs " plus the sender's email. Use the split
command on the line with a colon as the separator.

Take a look at the file and there will be a number of fields in there.
With a little program to loop through the fields in the text file, you
may be able to get everything you need very easily.

By using the spilit command and the resulting array, you will get the
field name and the field value in the array. Then, you can process
each field as you like.

Depending on your needs, it can be a good solution.

Greg



Ads