A family of Microsoft word processing software products for creating web, email, and print documents.
Hello @Jahouri, Mohamed Reda (DFO/MPO)
Thank you for your detailed question and for the troubleshooting you've already done.
You have correctly identified a known, though not widely documented, limitation within the Microsoft 365 platform. The built-in mechanism for "promoting" document properties from a Word file to SharePoint columns is not designed for a large number of fields. As you've experienced, it tends to fail around the 40-60 property mark. This feature was intended for basic document metadata, not for using Word as a large-scale data entry form with 160 fields.
Your idea to use a custom XML part is also very insightful and is indeed how a developer might approach this. However, as you correctly suspected, linking that custom XML to SharePoint columns requires custom code (like PnP PowerShell or an Azure Function) and is not an out-of-the-box feature.
Recommended solution: A Modern Approach with Power Platform
Instead of using the Word document as the input form, the modern and Microsoft-recommended approach is to separate the data capture process from the document generation process. This is a much more scalable and robust solution.
Here is the recommended workflow:
Step 1: Create Your Data Source in SharePoint:
First, create a SharePoint List that contains all ~160 columns you need. This list will become the single source of truth for your data.
Step 2: Build a User-Friendly Input Form with Power Apps:
- Next, create a Power App that is connected to the SharePoint list from Step 1.
- A Power App allows you to build a rich, user-friendly data entry form. For 160 fields, you can easily organize them into multiple screens or tabs, add data validation rules (e.g., ensure dates are valid, fields are not empty), and create a much better user experience than a simple Word document.
Step 3: Automate Document Creation with Power Automate:
- Create a Power Automate flow that does the heavy lifting automatically.
- Create a Power Automate flow triggered "When an item is created or modified" in your SharePoint list.
- Use the "Populate a Microsoft Word template" action to fill in placeholders (Content Controls) in a Word template.
- Finally, it will use the "Create file" action to save the newly generated, fully populated Word document into your SharePoint Document Library.
You can find more information here: Use SharePoint and Power Automate to build workflows - Power Automate | Microsoft Learn
If you don’t have access to Power Automate cloud flows due to licensing or permissions, you can consider using Power Automate Desktop. It allows you to automate local processes, including working with Word documents and SharePoint via browser automation or APIs.
Benefits of this approach:
- No Limits: It completely bypasses the document property limitation and can scale to hundreds of fields.
- Better Data Integrity: You can enforce data validation rules in Power Apps before the data is even saved.
- Superior User Experience: The data entry process is much smoother and more organized.
- Separation of Concerns: Your structured data lives in a SharePoint list (easy to report on, export, and manage), while the Word document is simply a presentation of that data.
While this is a shift from your original plan, it is the standard and most powerful method for achieving your goal within the Microsoft 365 ecosystem.
I hope this detailed explanation provides a clear and effective path forward. Please feel free to ask if you have any more questions.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment”.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread