A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

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



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 6th 06, 12:07 PM posted to microsoft.public.outlook.program_vba
news.microsoft.com
external usenet poster
 
Posts: 65
Default outlook 2k3 Script: how to Save Mail body to txt file

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



Ads
  #2  
Old November 6th 06, 03:23 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default outlook 2k3 Script: how to Save Mail body to txt file

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"news.microsoft.com" wrote in message
...
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




  #3  
Old November 6th 06, 08:55 PM posted to microsoft.public.outlook.program_vba
bbnimda
external usenet poster
 
Posts: 29
Default outlook 2k3 Script: how to Save Mail body to txt file

How can I extract and save ??? I tryed different things but no one
success....


"Ken Slovak - [MVP - Outlook]" a écrit dans le message
de news: ...
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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"news.microsoft.com" wrote in message
...
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






  #4  
Old November 6th 06, 09:59 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default outlook 2k3 Script: how to Save Mail body to txt 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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"bbnimda" wrote in message
...
How can I extract and save ??? I tryed different things but no one
success....


  #5  
Old November 7th 06, 08:45 AM posted to microsoft.public.outlook.program_vba
news.microsoft.com
external usenet poster
 
Posts: 65
Default outlook 2k3 Script: how to Save Mail body to txt file

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 .....




"Ken Slovak - [MVP - Outlook]" a écrit dans le message
de news: ...
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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"bbnimda" wrote in message
...
How can I extract and save ??? I tryed different things but no one
success....




  #6  
Old November 7th 06, 03:23 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default outlook 2k3 Script: how to Save Mail body to txt file

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"news.microsoft.com" wrote in message
...
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 .....


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2k3 Script: Exporting Task item to Excel news.microsoft.com Outlook and VBA 5 November 8th 06 05:01 PM
Outlook 2k3 Script: Pb extracting list of items news.microsoft.com Outlook and VBA 4 November 7th 06 08:42 AM
Saving an email in .txt file Maggie Helton Outlook and VBA 1 August 23rd 06 06:54 AM
Outlook 2k3 RPC over HTTP Script vzerbonia Outlook - Installation 0 July 27th 06 08:35 PM
last string in txt file Leech Outlook and VBA 1 February 10th 06 08:13 AM


All times are GMT +1. The time now is 05:30 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.