Forum Discussion

Project03's avatar
Project03
Copper Contributor
Dec 05, 2025
Solved

How to add a new field to existing XML Mapping

Hi, everyone! Good day!


I've made an XML file which I imported to my doc using XML Mapping Pane -> (Add new part...) and I used it to map some texts.

Imported XML fieldsFields being used as Plain Text Content Control

 

 

 

 

 

 

 

How could I add new fields to this XML Mapping?

 

What I tried:

I tried editing the XML file and then importing it again. As a result, I have two XML Mappings with the same name that act as completely separate mappings. I couldn't even find a way to delete the older one.

  • Project03's avatar
    Project03
    Dec 09, 2025

    Thank you very much, Charles_Kenyon​!

    All great contents, they absolutely got me there! What actually got me to the answer was https://learn.microsoft.com/en-us/answers/questions/5029965/xml-location-of-document-properties-in-quick-partsthat%20list%20-%20Sharepoint mensioned in https://addbalance.com/word/MappedControls.htm.
    The solution for this is simply explained https://sharepointmaven.com/how-to-add-sharepoint-metadata-to-word-documents-using-quick-parts-document-properties/ as well, which is:

    1. create a SharePoint Team page
    2. add a Documents Library
    3. create a Word doc at the library (or upload an existing one as I did)
    4. add new columns/properties to the Documents Library
    5. these properties can now be inserted in Word with Quick Parts's Document Properties, keeping the mapping function
    6. you can also download the file with those properties built-in or make some template from it

    That's neat! Better and simpler than what I was expecting.

5 Replies

  • Charles_Kenyon's avatar
    Charles_Kenyon
    Bronze Contributor

    See:

    The first link is a web page. The second is to a video. Both are done by experts who are good at explaining.

     

    It has been a while since I've done this. I usually do not need many such content controls and simply repurpose some of the built-in Document Property Content Controls.

    See :

     

    BTW: These are Content Controls, not fields. (Word jargon)

    • Project03's avatar
      Project03
      Copper Contributor

      Thank you very much, Charles_Kenyon​!

      All great contents, they absolutely got me there! What actually got me to the answer was https://learn.microsoft.com/en-us/answers/questions/5029965/xml-location-of-document-properties-in-quick-partsthat%20list%20-%20Sharepoint mensioned in https://addbalance.com/word/MappedControls.htm.
      The solution for this is simply explained https://sharepointmaven.com/how-to-add-sharepoint-metadata-to-word-documents-using-quick-parts-document-properties/ as well, which is:

      1. create a SharePoint Team page
      2. add a Documents Library
      3. create a Word doc at the library (or upload an existing one as I did)
      4. add new columns/properties to the Documents Library
      5. these properties can now be inserted in Word with Quick Parts's Document Properties, keeping the mapping function
      6. you can also download the file with those properties built-in or make some template from it

      That's neat! Better and simpler than what I was expecting.

  • When an XML file is imported through the XML Mapping Pane, Word registers it as a completely new custom XML part. Consequently, re‑importing an edited version does not update the existing mapping but instead creates a duplicate entry, please try below to add new fields:

     

    1. Edit the XML file externally
      • Add the new elements/fields you want in your XML schema or data file.
      • Save the updated XML.
    2. Replace the existing Custom XML Part instead of adding a new one
      • Open the Developer tabXML Mapping Pane.
      • Right‑click the existing XML part.
      • Choose Delete to remove the old mapping.
      • Now use Add new part… to import your updated XML file.
      • This ensures you only have one XML part with the new fields.
    3. Re‑map your content controls
      • After re‑importing, the new fields will appear in the XML Mapping Pane.
      • Insert new Plain Text Content Controls and bind them to the new fields.
      • Existing controls bound to unchanged fields will continue to work.
    • Project03's avatar
      Project03
      Copper Contributor

      Hi, Kidd_Ip​! Thank you for your reply.

       

      I've just tried to do it as you said but right-clicking the added part in XML Mapping Pane didn't give me any option to Delete. In fact, it does nothing for me. Could you tell me if some selection pane shows up when you right-click an XML part on XML Mapping Pane in your Word instance?

Resources