Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / April 2008

Tip: Looking for answers? Try searching our database.

Trouble saving a text attachment

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
EMoscosoCam - 29 Apr 2008 22:18 GMT
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] - 29 Apr 2008 23:09 GMT
Are you specifying the save as file type as OlTXT? Please show your SaveAsFile code statement.

Signature

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

> Hello
>
[quoted text clipped - 6 lines]
>
> Thanks a lot.
EMoscosoCam - 29 Apr 2008 23:37 GMT
objAttachment.SaveAsFile "c:\Details.txt"

Well, the SaveAsFile() only has one argument.

> Are you specifying the save as file type as OlTXT? Please show your SaveAsFile code statement.
>
[quoted text clipped - 8 lines]
> >
> > Thanks a lot.
Sue Mosher [MVP-Outlook] - 30 Apr 2008 01:47 GMT
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.

Signature

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

> objAttachment.SaveAsFile "c:\Details.txt"
>
> Well, the SaveAsFile() only has one argument.
>
>> Are you specifying the save as file type as OlTXT? Please show your SaveAsFile code statement.

>> > Hello
>> >
[quoted text clipped - 6 lines]
>> >
>> > Thanks a lot.
EMoscosoCam - 30 Apr 2008 02:50 GMT
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, 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.
>
[quoted text clipped - 14 lines]
> >> >
> >> > Thanks a lot.
Sue Mosher [MVP-Outlook] - 30 Apr 2008 14:49 GMT
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.

Signature

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
[quoted text clipped - 19 lines]
>> >> >
>> >> > Thanks a lot.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.