Skip to main content
Post a question

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id : UHAn0jSVeQumEQU4GMq1Mq
Customer experience | Sales, Customer Insights,...
Suggested answer

Creating Word Templates with Mac - XML Mapping not supported

Like (2) ShareShare
ReportReport
Posted on 21 Mar 2025 15:44:35 by 4
Hi,
 
I am trying to create a custom Word template for Dynamics 365 Sales CRM. On Windows, I know this is done via the Developer Tab → XML Mapping Pane, where you insert content controls. But since XML Mapping is missing on Mac, I am trying to manually edit the XML inside the .docx file.
 
I am able to open the XML data in VS code, but I don't know how it is possible to add them to the word template without xml mapping. (I tried simply copying the filed tags in the Word, uploading it in Dynamics, but it didn't map the values when I downloaded the template for a contact). 
 
I don't want to use VM on my mac. Because it is for my workplace and I am looking for a solution that can be useful for all employees.
 
I appreciate any ideas and help!
 
  • Suggested answer
    Daivat Vartak (v-9davar) Profile Picture
    3,135 Super User 2025 Season 1 on 22 Mar 2025 at 11:11:02
    Creating Word Templates with Mac - XML Mapping not supported
    Hello CU21031511-0,
     

    You've correctly identified the core challenge: the absence of the XML Mapping Pane on macOS Word makes the standard Dynamics 365 Word template customization process impossible. Manually editing the XML directly is a valid approach, but you need to understand the structure and how Dynamics 365 expects the content controls to be defined.

    Understanding the XML Structure:

    When you create a Word template in Dynamics 365, the system generates XML tags within the document that correspond to the fields you want to display. These tags are embedded within "customXml" parts of the .docx file.

    Manual XML Editing Steps (macOS):

    1. Unzip the .docx File:

      • Rename the .docx file to .zip.
      • Unzip the archive. 

    2. Locate the customXml Folder:

      • Navigate to the customXml folder within the unzipped archive. 

    3. Identify the Relevant XML File:

      • Look for an XML file with a name like item1.xml or similar. This file contains the data mapping information. 

    4. Open the XML File in VS Code:

      • Open the XML file in VS Code. 

    5. Understand the Structure:

      • You'll see elements like <a:dataBinding>, <a:xpath>, and <a:prefixMappings>. These elements define the mapping between the XML data and the Word content controls.
      • The xpath attribute is crucial. It specifies the path to the field in the Dynamics 365 data source. 

    6. Add Your Custom Field Mappings:

      • To add a new field mapping, you need to add a new <a:dataBinding> element.

      • Example:
         

        • Replace fieldname with the logical name of your Dynamics 365 field.
        • Replace r:id="rId1" with a unique ID for the relationship. 
         

    7. Create Content Controls in document.xml:

      • Go back to the unzipped folder, and navigate to word/document.xml.
      • Open document.xml in VS Code.
      • Add a <w:sdt> element (Structured Document Tag) to the location where you want the field to appear.

      • Example:

           
         
        • Replace fieldname with the logical name of your Dynamics 365 field.
        • Ensure the w:xpath value matches the a:xpath value in item1.xml.
        • The w:id must be unique. 

    8. Re-zip the Files:

      • Select all the files and folders in the unzipped archive.
      • Create a new .zip archive. 

    9. Rename to .docx:

      • Rename the .zip archive to .docx. 

    10. Upload to Dynamics 365:

      • Upload the modified .docx file to Dynamics 365 as a Word template.

      •  

    11.  

    Important Considerations:

    • Logical Names: Ensure that you use the correct logical names of the Dynamics 365 fields.
    • XML Namespaces: Pay attention to the XML namespaces.
    • Testing: Thoroughly test the template after uploading it to Dynamics 365.
    • Complexity: Manually editing XML is complex and error-prone.
    • Consistency: This method is not ideal for large scale deployments to many employees, due to the complexity.

    •  

    Alternatives (For Better User Experience):

    1. Windows VM:

      • While you mentioned avoiding VMs, it's the most reliable and supported way to create Dynamics 365 Word templates.
      • You could set up a shared VM for your team. 

    2. Third-Party Tools:

      • Explore third-party tools that simplify Dynamics 365 Word template creation.
      • Some tools provide a user-friendly interface for mapping fields. 

    3. Power Automate (Limited):

      • Power Automate could be used to generate the desired word document, however, it does not use the same method as the built in word templates. 

    4.  

    Key Recommendations:

    • Use a Windows VM if possible: It's the most straightforward and reliable approach.
    • If you must manually edit XML, proceed with caution and thorough testing.
    • Explore third-party tools for a more user-friendly experience.
     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,245 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,925 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans
Loading started