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 / May 2006

Tip: Looking for answers? Try searching our database.

open attachments

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Karsten Jung - 15 May 2006 13:27 GMT
Hello together!

Perhaps you can help me.

var oAttachs = objMessage.Attachments;
var oAttach = oAttachs.Item(iAttach);

oAttach is the attachment I want to open.

Can I open it directly or do I have to save the attachment to the
FileSystem?

When the attachment must be saved to fileSystem, how can I remove  the
file after e.g. word was closed?

I should not fill the disc ;-)

thanks, Karsten
Sue Mosher [MVP-Outlook] - 15 May 2006 13:32 GMT
You must save the attachment to the file system. You can use FileSystemObject methods to delete the file. See http://www.outlookcode.com/d/code/copyatts.htm for sample code.

Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx
 

> Hello together!
>
[quoted text clipped - 14 lines]
>
> thanks, Karsten
Karsten Jung - 15 May 2006 14:03 GMT
Sue Mosher [MVP-Outlook] schrieb:

> You must save the attachment to the file system. You can use FileSystemObject methods to delete the file. See http://www.outlookcode.com/d/code/copyatts.htm for sample code.
>
[quoted text clipped - 5 lines]
>      Administrators, Power Users, and Developers
>      http://www.outlookcode.com/jumpstart.aspx

Thank you, but I have to wait until word is closed, how  to realize
this part? I cannot simply call FileSystemObject.Delete

Karsten
Sue Mosher [MVP-Outlook] - 15 May 2006 14:18 GMT
Maybe your application could periodically look to see if there is a Word temporary file (beginning with ~) to match the file you saved. You might get other ideas in a Word forum.

Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx
 

>
> Sue Mosher [MVP-Outlook] schrieb:
[quoted text clipped - 3 lines]
> Thank you, but I have to wait until word is closed, how  to realize
> this part? I cannot simply call FileSystemObject.Delete

"Sue Mosher [MVP-Outlook]" <suemvp@outlookcode.com> wrote in message news:%23sz6pwBeGHA.3948@TK2MSFTNGP03.phx.gbl...
You must save the attachment to the file system. You can use FileSystemObject methods to delete the file. See http://www.outlookcode.com/d/code/copyatts.htm for sample code.

 
"Karsten Jung" <kenduron@web.de> wrote in message news:1147696049.678714.239170@g10g2000cwb.googlegroups.com...
> Hello together!
>
[quoted text clipped - 14 lines]
>
> thanks, Karsten
 
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



©2009 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.