Tuấn Anh Phạm
Tuấn Anh Phạm

Reputation: 69

C# Outlook Plugin - Get full path (origin source file) of attachment in mail?

I want to get full path (origin source file) of attachment in mail Outlook, I use object Attachment in Outlook to get Pathname: Attachment.PathName, but it returns null.

So, how can I get the source file's link?

Example: this is a link to image attachment in a my email

Upvotes: 1

Views: 575

Answers (1)

Koby Douek
Koby Douek

Reputation: 16675

Email attachments do not have a source path. Once they were sent, they are part of the message, not part of any file system, regardless of their source path. The best you can do is get the attachment file name.

As you can read here, Attachment.PathName only works with linked files, not attached files:

Remarks: This property is only valid for linked files.

Upvotes: 1

Related Questions