0

I have a word document .docx which contain a property, currently when i tried to add more than 255 charterers inside the word document property i will get an error that the it is invalid. so can i exerted this limit? Thanks

enter image description here

macropod
  • 12,757
  • 2
  • 9
  • 21
John John
  • 1
  • 72
  • 238
  • 501
  • 1
    I think the error explains that you can’t. What you can do is combine multiple doc properties to contain the account number (assuming that is the value that exceeds 255 characters) – Boeryepes Aug 04 '22 at 16:37
  • @Boeryepes so we can not exceeds this limit? – John John Aug 04 '22 at 16:45
  • 1
    If this property is defined in SharePoint, SharePoint sets a maximum of 255 characters for a column of type "single line of text". In that case, it may be possible change the column type, but even then you may find that there is a maximum length. – jonsson Aug 04 '22 at 17:05
  • @jonsson no i am using the Multiple line of text field in SharePoint which can hold more than 255 chars.. the issue is with the word property itself – John John Aug 04 '22 at 17:59
  • 1
    You can use Content Controls which are **mapped to XML** to hold more. The simplest example of these are the Document Property Content Controls. SharePoint allows you to add to these. https://addbalance.com/word/MappedControls.htm#PageStart and https://gregmaxey.com/word_tip_pages/EnhancedDocProp_AddIn.html. – Charles Kenyon Aug 04 '22 at 19:33
  • 1
    @Charles Kenyon - Quite. It seems they are already mapped. The question is whether SP is imposing its own constraint. ISTR something about this but haven't had a SharePoint account for a while so can't check. – jonsson Aug 04 '22 at 19:58

1 Answers1

1

This is the max size of the document property. You can't change it. Instead you may consider using document variables and DOCVARIABLE fields, which do not have such a limit.

Also consider writing long data into multiple properties like described in the How to overcome custom document property size limit post.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • ok thanks .. so if i use document variables will i be ale to populate them using Power automate flows? Thanks – John John Aug 04 '22 at 19:53
  • 1
    I don't think these are old-style Custom Document Properties, which do have a 255 limit. I think they are SharePoint columns mapped via a CustomXmlPart to a plain text Content Control. Multiline plain text Content controls allow far more than 255 characters, as does the Custom XML Part where the data is stored. But ISTR there *is* a constraint because of course when Sharepoint serves a document, it populates the relevant Custom XML Part, but ISTR it imposes an arbitrary, undocumented constraint. Just can't find my very old notes on the subject. – jonsson Aug 04 '22 at 19:53
  • @jonsson sorry i did not get your point. you mean if i use document variables instead of document properties i will not be able to populate them using Power automate? – John John Aug 04 '22 at 19:56
  • 1
    @john john My comment was really in response to Eugene's Answer. I don't know whether you can populate Document Variables using Power Automate or not. Probably not, because Document Variables are "very old technology" from a Microsoft perspective. – jonsson Aug 04 '22 at 20:05
  • I thought that SP allowed more than 255 in some cases but after finding my old experiments it seems it will truncate to 255. [SP populates the .docx with the data and an XML Schema describing the data, e.g. ] – jonsson Aug 05 '22 at 08:19