Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-04-2022, 03:21 PM
Guessed's Avatar
Guessed Guessed is offline Binding Custom XML-Based Items to Content Control Dropdown Windows 10 Binding Custom XML-Based Items to Content Control Dropdown Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,187
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default


As far as I know you can only bind a single xml node to a content control.

I've had no problem binding a node to a dropdown CC and the method is no different to binding a node to a plain text CC. The only complexity with dropdown CCs is that each entry has a display name and a value. The value is what gets stored in the XML node.

Are you trying to populate the dropdown CC options with multiple nodes? As far as I'm aware, that isn't dynamic and you would need to use code to clear the dropdown list and repopulate it from the xml data. This is not mapping.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #2  
Old 09-06-2022, 12:20 PM
Peterson Peterson is offline Binding Custom XML-Based Items to Content Control Dropdown Windows 10 Binding Custom XML-Based Items to Content Control Dropdown Office 2019
Competent Performer
Binding Custom XML-Based Items to Content Control Dropdown
 
Join Date: Jan 2017
Posts: 143
Peterson is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
As far as I know you can only bind a single xml node to a content control.

I've had no problem binding a node to a dropdown CC and the method is no different to binding a node to a plain text CC. The only complexity with dropdown CCs is that each entry has a display name and a value. The value is what gets stored in the XML node.

Are you trying to populate the dropdown CC options with multiple nodes? As far as I'm aware, that isn't dynamic and you would need to use code to clear the dropdown list and repopulate it from the xml data. This is not mapping.
Correct: I'm trying to populate the dropdown CC options with multiple nodes. I can see it done with SharePoint-injected column lists, and in the Eric White video in my initial post.

I need to use custom XML because the template I'm working on already uses it extensively, and all data bound to content controls must reside in custom XML; a design requirement is that data can't be in built-in doc properties or the body of the doc.

At one point while trying to create a dropdown content control mapped to a custom XML node, the dropdown items were showing up in document.xml. However, I was not including both names AND values, so it sounds like I need to go back and try that approach. Finally, the dropdown item nodes would be static: it's a list of ~50 items that will never change.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Binding Custom XML-Based Items to Content Control Dropdown Change Value of a Content Control based on the value of another content Control jsc_msoffice Word VBA 2 05-21-2021 09:51 PM
Binding Custom XML-Based Items to Content Control Dropdown Auto populate a text field based on Content Control Dropdown List matthias92701 Word VBA 2 05-02-2019 03:54 PM
Word VSTO Content Control binding to XML issue phyrjc Word 0 03-25-2019 08:56 AM
Binding Custom XML-Based Items to Content Control Dropdown Dropdown content control and tables hrzagi Word 1 12-17-2017 09:38 PM
Binding Custom XML-Based Items to Content Control Dropdown Content Control Dropdown Dependencies asteinroeder Word VBA 5 10-28-2015 03:56 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:48 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft