Character Limit on file property value returned by getDetailsOf?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • postman
    New Member
    • Nov 2008
    • 63

    Character Limit on file property value returned by getDetailsOf?

    I'm using Access/VBA to traverse a file directory and produce a table of contents, including the keywords in the files' extended properties.

    I've been able to successfully do this using the getDetailsOf method of the shell.namespace .folder object. However, I've noticed that for files with lengthy keyword strings, only a part of the keyword value is returned--not the entire thing.

    Does anyone know if there is a limit to the size of the value that can be returned by this method?

    Thanks.
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32661

    #2
    I had a look for you and found BSTR (referring to the Type of the return value). I could find no indication of such a short limit. It implies a string of approximately 2GB is allowed. How this is handled within VBA and, more specifically your code, is something I don't know. It sounds like it may be cutting off at 255 chars.

    Comment

    • postman
      New Member
      • Nov 2008
      • 63

      #3
      Originally posted by NeoPa
      I had a look for you and found BSTR (referring to the Type of the return value). I could find no indication of such a short limit. It implies a string of approximately 2GB is allowed. How this is handled within VBA and, more specifically your code, is something I don't know. It sounds like it may be cutting off at 255 chars.
      It is cutting off at 260 characters. The file is storing all the keywords, so there must not be a limit on the file system side.

      Strange side note--not sure if it's signifcant: when I view a file's properties in Windows XP, on the Summary tab if it's in the "Simple" view and I click in the Keyword field and scroll over, it's cut off at 260 characters. If I then click the "Advanced" view--still only the first 260 characters show. However, if I open the properties and go to the "Advanced" view without first clicking in the Keywords field in the "Simple" view, the entire value is there.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32661

        #4
        Strange indeed.

        Unfortunately not an area I have much experience in myself.

        Comment

        Working...