I'm working on a Outlook VSTO Addin that will plug-into the iManage FileSite AddIn, I'm currently trying to access the currently selected folders ID (Within the DMS) and I noticed that the CurrentFolder.EntryID property contains a very large Hexidecimal string, which when converted to UTF-16 looks like a malformed ObjectID for iManage. See below (Some info is redacted):
�"�j���'`�W�vp441!nrtdms:0:!session:REDACTED:!database:TEC:!page:440:??!nrtdms:0:!session:REDACTED:!database:TEC:!publicpagescontainer??!nrtdms:0:!session:REDACTED:!database:TEC:??!nrtdms:0:!session:REDACTED:!explorercontainer??!nrtdms:0:!session:REDACTED:??!nrtmsg:neighborhood:??!nrtmsg:root:
I have been working on some regex to separate the Folder ID from the rest of the string but I can't help but think there's a more stable method.
Anyone have any ideas?
The ENTRYID identifier structure is described in MSDN. The
ENTRYID
structure is used by message store and address book providers to construct unique identifiers for their objects.Members
abFlags - Bitmask of flags that provide information that describes the object. Only the first byte of the flags, abFlags[0], may be set by the provider; the other three are reserved. These flags must not be set for permanent entry identifiers; they are only set for short-term entry identifiers. To clients, this structure is read-only. The following flags can be set in abFlags[0]:
ab - Indicates an array of binary data that is used by service providers. The client application cannot use this array.
You can convert the string to a binary data using the PropertyAccessor.StringToBinary method which converts a string specified by Value to an array of bytes. For more information on type conversion when using the
PropertyAccessor
object, see Best Practices for Getting and Setting Properties.