Trouble saving a text attachment

  • Thread starter Thread starter EMoscosoCam
  • Start date Start date
E

EMoscosoCam

Hello

I want to save a text attachment to a certain directory, using the
SaveAsFile method. When I open the saved text, I cannot be readable; what
should I do?

The attachment is "details.txt", typical attachment when a mail sent bounces
back.

Thanks a lot.
 
Are you specifying the save as file type as OlTXT? Please show your SaveAsFile code statement.
 
objAttachment.SaveAsFile "c:\Details.txt"

Well, the SaveAsFile() only has one argument.
 
Sorry, I misread your original post and thought you were saving a message, not an attachment. Saving an attachment with a .txt extension makes sense only if the attachment is in fact a plain text file. If it's a .doc file, for example, changing the extension to .txt is going to leave you with gibberish.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
In fact the attached file is txt: "Details.txt", which is the typical file
that returns when a previous message is bounced back, and this file reports
the error. The file can be opened and be seen within Outlook, but when using
the SaveAsFile method the content cannot be readable.
 
Sorry, but I can't think of any scenario in which an attachment would be readable when double-clicked from the message and unreadable when saved with the same file extension.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
Back
Top