how to save incoming mail in TRUE csv format

  • Follow


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
0
Reply Utf 5/27/2010 9:03:20 PM

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
0
Reply Utf 5/27/2010 9:55:07 PM


1 Replies
454 Views

(page loaded in 0.047 seconds)

Similiar Articles:
















7/22/2012 1:21:42 AM


Reply: