Outlook 2007 PropertyAccessor.GetProperty
pa = m_olMail.PropertyAccessor;
string propname = "http://schemas.microsoft.com/mapi/proptag/0x0030001E";
string sprop = pa.GetProperty(propname).ToString();
I'm using this code to access a property of a mail object in Microsoft Outlook 2007, but I always get a DISP_E_TYPEMISMATCH error
"Message "Type komt niet overeen. (Uitzondering van HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))" string"
I tried everything, but I can't seem to find the problem. When I use object I get the same problem.
object test = pa.GetProperty(propname);
Convert.ToString() also doesn't work. And as last hope I tried to use the BinaryToString() method, but no result.
Anybody that can help me? Cause I'm starting to get an idea it's an internal problem of Outlook itself.
Programming code is like magic, just use the right code (magic words) to make happen what you want...