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

how to save incoming mail in TRUE csv format



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 27th 10, 11:03 PM posted to microsoft.public.outlook.program_vba
Matt
external usenet poster
 
Posts: 119
Default how to save incoming mail in TRUE csv format

I have a script in Outlook 2007 that automatically saves incoming emails to a
folder as a txt. Simply changing my code to olCSV does not comma separate the
values. How can i convert this to a csv format? Is it possible?

Obviously I'm a real newbie. Thanks in Advance or all/any help!

here's my code:

Sub saveemail(myItem As Outlook.MailItem)
myItem.SaveAs "c:\mail\" & myItem.Subject & ".txt", olTXT

End Sub

Matt
Ads
  #2  
Old May 27th 10, 11:55 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_4_]
external usenet poster
 
Posts: 552
Default how to save incoming mail in TRUE csv format

Outlook has no native ability to turn text into a csv file. If you want to do
more than save the message as a .txt file, you'll have to add your own code
to parse the message content or parse the .txt file. Either way, only you
know what you have in mind. It's not clear at all from your description what
"values" you want saved in .csv format.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54



"Matt" wrote:

I have a script in Outlook 2007 that automatically saves incoming emails to a
folder as a txt. Simply changing my code to olCSV does not comma separate the
values. How can i convert this to a csv format? Is it possible?

Obviously I'm a real newbie. Thanks in Advance or all/any help!

here's my code:

Sub saveemail(myItem As Outlook.MailItem)
myItem.SaveAs "c:\mail\" & myItem.Subject & ".txt", olTXT

End Sub

Matt

 




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
Changing incoming email Format Cordell Outlook - General Queries 1 February 21st 07 07:30 PM
Restricting image format "save" options within received E-mail? AngelT Outlook - Installation 1 January 11th 07 06:59 AM
Save incoming e-mail as msg with name = sent date Ed_Berez Outlook and VBA 1 April 6th 06 07:33 AM
Outlook 2003 Default Incoming E-Mail Address Format Issue Rich Gory Outlook - General Queries 3 March 14th 06 03:15 AM
I need to save a contact in SMTP format not exchange format. JAX Outlook - Using Contacts 0 February 15th 06 02:51 PM


All times are GMT +1. The time now is 04:51 PM.


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.