Saving file to a string

J

john bailo

For a c# program to automatically extract information from email attachments
using the Outlook 9 OM, rather than saving to a file, then reading the file,
I would prefer to 'Save' the attachment to a string variable.

The OM says that .SaveAsFile returns void. The input parameter is a
string.

Is there any way I could somehow 'fool' this method to 'save the file to
string' variable so I don't have to then, open the file and read it back
into a string ?
 
P

Peter Rilling

I don't know about your specific question, but if you are not able to get
Outlook work return a string, you could save the file to the temporary
folder and read it in that way. Then remove the file when your program
exits. That would the user the illusion that it is simply reading the file
since there will be no visible evidence of files cluttering the system.
 
J

john bailo

Peter Rilling said:
I don't know about your specific question, but if you are not able to get
Outlook work return a string, you could save the file to the temporary
folder and read it in that way. Then remove the file when your program
exits. That would the user the illusion that it is simply reading the file
since there will be no visible evidence of files cluttering the system.

That is what I am doing.

But I was hoping to accomplish the same thing without File I/O.
 
S

Sue Mosher [MVP]

Outlook doesn't permit that.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
J

john bailo

Outlook doesn't permit that.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers


The Politburo has spoken !!!

:D
 

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