c# - Attempting to get DASL property value from the Outlook table inbox -


i'm attempting read dasl value pr_longterm_entryid_from_table 0x66700102 mentioned in thread - get outlook mailitem message taken outlook table

the issue i'm having following line in code below full example below-

string ltentryid = (string)nextrow["http://schemas.microsoft.com/mapi/proptag/0x66700102".tostring()]; 

it throws exception "cannot convert type 'byte[]' 'string'"

i might going wrong way i'm looking advice. can read other tables rows fine (example- "entryid(short term), messageclass, unread, senderemailtype).

const string unreadfilter = "[unread] = true"; outlook.table table = folder.gettable(unreadfilter, outlook.oltablecontents.oluseritems);  // remove default column set. table.columns.removeall();  // add columns 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 following line***   string ltentryid = (string)nextrow["http://schemas.microsoft.com/mapi/proptag/0x66700102".tostring()];    debug.writeline(ltentryid);    if (msgclass.equals("ipm.note"))     {     //write string list     dailymiinboxlist.add(unread.tostring());     dailymiinboxlist.add(msgclass);     dailymiinboxlist.add(eid);     dailymiinboxlist.add(seaddr);     dailymiinboxlist.add(setype);     dailymiinboxlist.add(seaddr);     dailymiinboxlist.add(ltentryid);          }  } 

pt_binary property returned array of byte, casting string. if want convert hex string, use mapifolder.propertyaccessor.binarytostring().


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -