The pathname of a file attachment is null

Add-in Express™ Support Service
That's what is more important than anything else

The pathname of a file attachment is null
 
nicolas Yanuzzio




Posts: 21
Joined: 2009-08-11
Hi,
how can I get the Pathname of a file attachment?
the pathname of the attachment is null

Thanks
Posted 11 Aug, 2009 20:07:57 Top
Eugene Astafiev


Guest


Hi Nicolas,

1. What version and build number of Add-in Express do you use?
2. What Outlook version do you use?
3. Did you save a mail item before?
Posted 12 Aug, 2009 05:58:34 Top
nicolas Yanuzzio




Posts: 21
Joined: 2009-08-11
Hi Eugene,

1. Add-in Express 2009 for Office and .NET, Standard package, Release 2009.5.1.2022.
2. I have to develop for Outlook 2003 and Outlook 2008.
3. The mailItem is saved in the event "ItemSend"

MailItem mailItem = item as Outlook.MailItem;
mailItem.Save();

Attachment attachment = attachments.Item(1);
String pathName = attachment.PathName;

okay way to do this?, I'm using Outlook 2003 for testing.
Thanks
Posted 12 Aug, 2009 07:48:21 Top
Eugene Astafiev


Guest


Hi Nicolas,

Please try using the http://www.add-in-express.com/products/mapi-store-events.php component.

BTW Can you tell me the value of the Type property?

Posted 12 Aug, 2009 08:06:46 Top
nicolas Yanuzzio




Posts: 21
Joined: 2009-08-11
The type of attachment?
if you mean it..
the type is olByValue

thanks Eugene


Posted 12 Aug, 2009 08:18:04 Top
Eugene Astafiev


Guest


Hi Nicolas,

I have just tested the issue you described above and got the same results. It looks like there is no anything strange in the empty PathName property. I suppose that you need to use the FileName property of the Attachment class.
Posted 12 Aug, 2009 08:47:08 Top
nicolas Yanuzzio




Posts: 21
Joined: 2009-08-11
thanks anyway Eugene!

I try to MAPI Store Accessor
Posted 12 Aug, 2009 10:02:47 Top
Eugene Astafiev


Guest



You are welcome, Nicolas.
Posted 12 Aug, 2009 10:08:29 Top