Aug 16 2023 11:05 PM
I have a Word template with embedded XML Mapping fields that was generated by Dynamics 365. This works great in building a document with just text , but when I try and place one of these XML content controls inside a merge field, this value is not populated when the template is used.
XML content fields are filled out when the the template is used, but if it was placed inside the quick part field, only the label for the field is shown.
This makes it impossible to leverage the cool Word features like using quick part fields to generate QR codes, which is my goal with this template.
For example:
Name: [BorrowerName ContentControl]
Borrower ID: [CardID Content Control]
{DisplayBarcode "[CardID Content Control] QR}
Will display this when opened with XML mapping data:
Name: John Citizen
Borrower ID: ABC123
QR Code with data "CardID Content Control" (field name, not expected value ABC123)
Is there any clever way to let XML content fields be used like document property fields, or alternative approach like an XML data field that has a URL path for an image that could be used to load the image in a Word template?
Aug 17 2023 01:47 PM
I am uncertain that I understand your question.
You seem to be conflating merge fields, document properties, and mapped Content Controls.
If you map a content control and copy that into another document, the new document will not have the XML node. If it is a Document Property Content Control, it will be mapped to that XML node in the recipient document, it does not carry the data with it.
Here are some resources.
Repeat text in MS Word Using Document Property content controls
Repeat Text in MS Word by Mapping Content Controls with the XML Pane
Aug 17 2023 11:10 PM
Aug 18 2023 10:53 AM - edited Aug 20 2023 09:40 AM
I am a fellow user and have no knowledge of Dynamics 365. You may want to see if there is a help forum specifically for that.
I have used the DisplayBarCode field with mapped content controls without problems. Note, though, that it is a field which must be updated upon a change in the content. It may update when you do a print preview. See Dealing with Fields in Microsoft Word.
P.S. The DisplayBarCode field is a field but not a merge field. The equivalent merge field is MergeBarCode. I have used both in merges, though. The DisplayBarCode field can contain data from a merge field to display a bar code.
Aug 18 2023 11:07 AM
Here is a link to the Microsoft Dynamics 365 forum. (It appears to be new and empty.)
https://community.dynamics.com/
Nevertheless, your question is likely to be seen there by people who know more about it than I do.
Aug 20 2023 05:34 PM
Jul 29 2024 08:21 AM