DocProperties are truncated after 255 characters

Last update: 4 August 2017

DocProperties are truncated after 255 characters

Summary

If you use Microsoft Office's DocProperty functionality with Fabasoft Folio or Fabasoft eGov-Suite, you may recognize that DocProperties with more than 255 characters get truncated to 255 characters.

Information

The Microsoft specification for DocProperties in the old Microsoft Office formats .doc, .xls and .ppt did not specify any size limit for DocProperties (there is a theoretical limit of 4 GB of the file format).

The Microsoft specification for DocProperties in the new Microsoft Office 2007+ formats .docx, .xlsx and .pptx specifies a size limit for DocProperties of 255 characters.

Starting with Microsoft Office 2010, Office applications began to also truncate DocProperties in the old Microsoft Office formats.

Fabasoft uses Microsoft APIs to write DocProperties to both old and new formats. Currently Fabasoft software itself does not truncate DocProperties, but the used Microsoft APIs do.

Therefore, Fabasoft cannot ensure that DocProperties longer than 255 characters survive the Microsoft Office processes during open, save, mail merge and conversion.

Solution

Fabasoft has information from own tests and our customers, that Microsoft APIs will truncate DocProperties in some circumstances, but not in others.

Due to that unsteadiness we recommend to not use DocProperties longer than 255 characters.

Fabasoft can suggest one of this ways to avoid long DocProperties (the first way is preferred):

  • Change to Office fields. Fabasoft has routines to push the result of Kernel Expressions to Microsoft Office fields.
  • Create multiple DocProperties in your Microsoft Office templates. In Folio, split longer texts to different DocProperties with 255 characters in size.

Further questions?