DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2005

    Outlook 2007 PropertyAccessor.GetProperty

    Outlook.PropertyAccessor pa;
    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...

  2. #2
    Join Date
    Mar 2005
    Los Angeles, Calif. AKA: Gangsta Yoda™
    The PropertyAccessor is supossed to be the way to do it. There is not a whole lot about this yet but I didnt see anything about bugs for it.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer code questions via PMs.
    Microsoft MVP 2006-2009
    Office Development FAQ (VBA, VB6, VB.NET, C#)
    Software Engineer MCP (VB6 & .NET)
    Reps & Rating PostsVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6Outlook Global Address List

Similar Threads

  1. working with Outlook
    By AM003295 in forum VB Classic
    Replies: 4
    Last Post: 07-19-2005, 10:03 AM
  2. SQL 7.0 Mail and Outlook client
    By pchak in forum Database
    Replies: 0
    Last Post: 05-03-2002, 05:36 PM
  3. Outlook 2000 and Encrypting
    By Bocien in forum Enterprise
    Replies: 0
    Last Post: 08-24-2001, 04:15 PM
  4. Re: Using VB forms in Outlook
    By Brian Weiss in forum Enterprise
    Replies: 1
    Last Post: 04-05-2000, 08:34 PM
  5. Programming Custom Views in Outlook
    By Brian Weiss in forum Enterprise
    Replies: 0
    Last Post: 03-31-2000, 08:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.