Trouble saving a text attachment

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

Sue Mosher [MVP-Outlook]

Are you specifying the save as file type as OlTXT? Please show your SaveAsFile code statement.
 
E

EMoscosoCam

objAttachment.SaveAsFile "c:\Details.txt"

Well, the SaveAsFile() only has one argument.
 
S

Sue Mosher [MVP-Outlook]

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
 
E

EMoscosoCam

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

Sue Mosher [MVP-Outlook]

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
 

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

Top