title: Attempting to get DASL property value from the Outlook table inbox
body: <p>I'm attempting to read the DASL value PR_LONGTERM_ENTRYID_FROM_TABLE 0x66700102 mentioned in this thread - 
  <a href="https://stackoverflow.com/questions/10848813/get-outlook-mailitem-for-message-taken-from-outlook-table">get outlook mailitem for message taken from outlook table</a></p>
  
  <p>The issue I'm having is with the following line in the code below from the full example below-</p>
  
  <pre><code>string ltEntryid = (string)nextRow["http://schemas.microsoft.com/mapi/proptag/0x66700102".ToString()];
  </code></pre>
  
  <p>It throws an exception "Cannot convert type 'byte[]' to 'string'"</p>
  
  <p>I might be going about this the wrong way so I'm looking for some advice. I can read all the other tables rows fine (Example- "EntryID(short term), MessageClass, Unread, SenderEmailType).</p>
  
  <pre><code>const string unReadfilter = "[UnRead] = true";
  Outlook.Table table = folder.GetTable(unReadfilter, Outlook.OlTableContents.olUserItems);
  
  // Remove the default column set.
  table.Columns.RemoveAll();
  
  // Add columns to the table
  table.Columns.Add("Unread");
  table.Columns.Add("EntryID");
  table.Columns.Add("MessageClass");
  table.Columns.Add("SenderEmailType");
  table.Columns.Add("SenderEmailAddress");
  // PR_LONGTERM_ENTRYID_FROM_TABLE
  table.Columns.Add("http://schemas.microsoft.com/mapi/proptag/0x66700102".ToString());
  // sort table
  table.Sort("Unread", true);
  
  while (!table.EndOfTable)
  {
    Outlook.Row nextRow = table.GetNextRow();
    bool unRead = (bool)nextRow["Unread"];
    Debug.WriteLine(unRead);
    string msgClass = (string)nextRow["MessageClass"];
    Debug.WriteLine(msgClass);
    string eId = (string)nextRow["EntryID"];
    Debug.WriteLine(eId);
    string sEaddr = (string)nextRow["SenderEmailAddress"];
    Debug.WriteLine(sEaddr);
    string sEtype = (string)nextRow["SenderEmailType"];
    Debug.WriteLine(sEtype);
  
    // PR_LONGTERM_ENTRYID_FROM_TABLE ***Exception with the following line***
    string ltEntryid = (string)nextRow["http://schemas.microsoft.com/mapi/proptag/0x66700102".ToString()];
  
    Debug.WriteLine(ltEntryid);
  
    if (msgClass.Equals("IPM.Note"))
      {
      //write to string list
      dailyMiInboxList.Add(unRead.ToString());
      dailyMiInboxList.Add(msgClass);
      dailyMiInboxList.Add(eId);
      dailyMiInboxList.Add(sEaddr);
      dailyMiInboxList.Add(sEtype);
      dailyMiInboxList.Add(sEaddr);
      dailyMiInboxList.Add(ltEntryid);     
      }
   }
  </code></pre>