3

I have created a document template (Test1.docx file) which has several MERGEFields in it. When I open the template in xml, I see some of the fields as SimpleFields and some as FieldCodes. Now, if I make some changes to the template (like adding some new template fields) and save it as Test2.docx and now when I open Test2.docx as an xml file, the field which came as SimpleField in the Test1.docx file's xml comes as FieldCode in the Test2.docx file's xml, even though I have not made any changes to that specific field. When is a mergefield be recognized by openxml as simple field and fieldcode?

Cindy Meister
  • 25,071
  • 21
  • 34
  • 43
A B
  • 31
  • 2
  • 1
    This is "normal" behavior - you can't count on any field code being created as or remaining "simple". There are a lot of factors involved and how the Open XML is generated is a decision the Word application makes. You can find more information in Eric White's blog and videos. Here's a good starting point that contains all the necessary links: http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2011/05/03/145486.aspx – Cindy Meister Feb 18 '16 at 18:44

0 Answers0