Properties of Attachments

  • Thread starter Thread starter Matt Williamson
  • Start date Start date
M

Matt Williamson

Is there anything that will let me get the properties of a linked document
attachment as seen by right clicking the attachment and going to properties.
In particular, I'm trying to get the Location of the file so I can save it
to disk. I'm using CDO code right now, so if it's possible in CDO, I'd
prefer it. I haven't found anything yet though.

TIA

Matt
 
In CDO an Attachment object to a Message has a Fields collection that you
would use to get whatever information is available about the attachment. If
you are using OutlookSpy (www.dimastr.com) you can see the attachment in the
Attachments Table for the IMessage and the property tags that would be used.
 
Ken-

I do have Outlook spy, but the item in question does not show up. These
attachments are to Contact items. The contact form we use is custom as well.
I don't think that makes a difference though. What I'm doing is walking the
Public Folder structure and drilling down into folders that use the custom
contact form and (attempting) to save the attachments to disk. Any
attachment that exposes a .name works fine, but there are some attachments
that are shorcuts to word files with the "display as editable information"
option set that have a blank name property. If I right click these and goto
Properties, there is a location field that lists the path to the file as
well as a link tab with the path listed, but I have not been able to get at
this programmatically.

Do I need to use Extended MAPI for this? If so, are there any COM libraries
that work with VB for that? I've been reading about the redemption library
exposing some extended MAPI, but I haven't gotten anywhere with it yet.

Thanks

Matt
 
You need to use CDO 1.21 or Extended MAPI or Redemption. Redemption would be
my choice since I almost never develop a serious application without it.
What you want isn't exposed to the Outlook object model.

If you have any Redemption questions Dmitry answers questions here and both
Sue and I use Redemption all the time.
 
Thanks for the input Ken. I'm coding this using CDO 1.21 in VB6. I think I
figured out what the problem was. I was using the [name] property of the
attachment object when I should have been using the [source] property. This
should give me what I'm looking for. Thanks again. I've gotten as far as I
have now from examples on the sites maintained by Sue, Dmitry and yourself
as well as archived answers that were primarily answered by one of you three
;)

Just letting all of you know that your time and knowledge is appreciated and
valued.

Thanks again..

Matt
 
Back
Top