Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Trouble saving a text attachment (http://www.outlookbanter.com/outlook-vba/71157-trouble-saving-text-attachment.html)

EMoscosoCam April 29th 08 10:18 PM

Trouble saving a text attachment
 
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.

Sue Mosher [MVP-Outlook] April 29th 08 11:09 PM

Trouble saving a text attachment
 
Are you specifying the save as file type as OlTXT? Please show your SaveAsFile code statement.

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


"EMoscosoCam" wrote in message ...
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.


EMoscosoCam April 29th 08 11:37 PM

Trouble saving a text attachment
 

objAttachment.SaveAsFile "c:\Details.txt"

Well, the SaveAsFile() only has one argument.



"Sue Mosher [MVP-Outlook]" wrote:

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

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


"EMoscosoCam" wrote in message ...
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.



Sue Mosher [MVP-Outlook] April 30th 08 01:47 AM

Trouble saving a text attachment
 
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


"EMoscosoCam" wrote in message ...

objAttachment.SaveAsFile "c:\Details.txt"

Well, the SaveAsFile() only has one argument.



"Sue Mosher [MVP-Outlook]" wrote:

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



"EMoscosoCam" wrote in message ...
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.



EMoscosoCam April 30th 08 02:50 AM

Trouble saving a text attachment
 
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.

"Sue Mosher [MVP-Outlook]" wrote:

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


"EMoscosoCam" wrote in message ...

objAttachment.SaveAsFile "c:\Details.txt"

Well, the SaveAsFile() only has one argument.



"Sue Mosher [MVP-Outlook]" wrote:

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



"EMoscosoCam" wrote in message ...
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.



Sue Mosher [MVP-Outlook] April 30th 08 02:49 PM

Trouble saving a text attachment
 
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


"EMoscosoCam" wrote in message ...
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.

"Sue Mosher [MVP-Outlook]" wrote:

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.

"EMoscosoCam" wrote in message ...

objAttachment.SaveAsFile "c:\Details.txt"

Well, the SaveAsFile() only has one argument.



"Sue Mosher [MVP-Outlook]" wrote:

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



"EMoscosoCam" wrote in message ...
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.




All times are GMT +1. The time now is 03:37 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-2006 OutlookBanter.com