I am not sure what you mean: if you are already accessing the Attachments
collection, it can only come from MailItem.Aattachments property (or other
item, such as ContactItem), so I am not sure what question # 1 means. As for
#2, do you mean select in what sense? As in when you select it in an
Inspector?
You can save an attachment to a file system using Attachment.SaveAsFile, you
can then manipulate it using teh regular Windows API.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
I looked at the Attachments objects, which is where I'm getting the count
and Items, but not the MailItems. Would you have an example of code I could
use to
1. get the attachment list, and
2. select x attachment from that list?
As I said, I'm a newby at this, and also blind, so the object browser isn't
the easiest tool for a screen-reader to use! Not whining, just stating a
fact!
--
Thanks,
Dennis
Yes, you can do all that. Have you looked at the MailItem.Attachments
collection and the Attachment object?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
Is there any way to access an attached file from the object model? If I
want to access the 12th file, how can I do this? I'd like to get the count
and list of files, then select one by the index, then have it do the same it
would do if I selected it by moving the mouse to the specific file in the
Attachments: field, and clicking on it (i.e. if it is a text file, execute
Notepad; a .doc extension, execute Word; etc.) Does the object model allow
this? What good is it to be able to index the attachments if you can't do
something with it!
Very, very new at this...can't you tell?!
--
Thanks,
Dennis
Embbeded images in the HTML messages are stored as regular attachments, they
just have an extra property (PR_ATTACH_CONTENT_ID or
PR_ATTACH_CONTENT_LOCATION) set.
HTMLBody refers to these images as <img src=cid:somevalue...> where
"somevalue" is thee value of the attachment content id. To prevent the user
from saving that attachment using File|Save, Outlook adds an extra property
(PR_ATTACH_HIDDEN).
These properties are not accessible though the Outlook Object Model: either
Extended MAPI/CDO 1.21/Redemption are required
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool