Find out whether MailItem Attachment is hidden or not

Bellow is a peace of code, which helps you find out whether Attachment is part of the body of an e-mail message (e.g. signature) or whether it is a regular attachment.

bool hidden;

try
{
    hidden = attachment.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x7FFE000B");
}
catch (System.Runtime.InteropServices.COMException)
{
    hidden = false;
}

This code works only with Office 2007 Interop Assemblies and later. For Outlook 2003 I suggest you use Redemption.