Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-03-2024, 07:12 AM
Guessed's Avatar
Guessed Guessed is offline Show or Hide Text using Mapped CCs and a CustomXMLPart Event Monitor Windows 10 Show or Hide Text using Mapped CCs and a CustomXMLPart Event Monitor Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
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

Greg

I've had a big play with your code and wrestled with the same event not firing that you encountered. I tried a bunch of different things but couldn't figure out how to get the xml updates to stick without your document variable workaround.

The only thing I would suggest that you don't need three nodes to switch contents around. I would toggle the mapping of the CC rather than changing the customXML. You still need the nullnode but only need one contentnode if changing the mapping on the fly.
Code:
        If oNodePassed.Text = "true" Then
          aCC.XMLMapping.SetMapping XPath:="/ns0:CC_Map_Root[1]/ns0:ContentNode[1]", Source:=oCXMLPart
        Else
          aCC.XMLMapping.SetMapping XPath:="/ns0:CC_Map_Root[1]/ns0:NullNode[1]", Source:=oCXMLPart
        End If
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Show Hide text using Radio buttons Costtx Word 2 10-26-2021 04:39 AM
Show/Hide text based on dropdown value AOSMITH Word VBA 2 11-19-2019 02:19 PM
Show or Hide Text using Mapped CCs and a CustomXMLPart Event Monitor How to use checkbox to show/hide bookmarked text? namrehx Word VBA 16 12-14-2017 01:45 PM
How to use checkbox to show and hide bookmarked text? namrehx Word VBA 1 12-12-2017 02:17 PM
Show or Hide Text using Mapped CCs and a CustomXMLPart Event Monitor Hide/Show text based upon check box status nathan.gray@emerson.com Word VBA 5 12-08-2017 01:08 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:19 PM.


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