outlook 2k3 Script: how to Save Mail body to txt file

  • Thread starter Thread starter news.microsoft.com
  • Start date Start date
N

news.microsoft.com

Hi all

I Want to save the body of my RTF mail to a txt File

I tryed

Item.body save as "c:\target.txt"

but it does'nt success

Tks for help
 
There is no SaveAs method for a body, only for an item. If you want to save
the entire item you would use Item.SaveAs.

If you only want to save the body you have to extract it as a string and use
your favorite method of saving text to a file.
 
If you read body into a string you've just extracted it. One way of saving a
string is to use Windows scripting. You can also use the VB file save
functions if programming in VB or the .NET file functions if programming in
a .NET language. Another approach is to use the Win32 API file system
functions.
 
Hi

Is there a way to do that directly from outlook ? I wonder if I can do all
In my persaonal Form becaus I'm gona share this form to all my office
outlook User .....
 
You can run the code in Outlook but you will need to use one of the methods
I mentioned to save the text to the file system.
 

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

Back
Top