stlnoob.blogg.se

Checkbox content control word 2016
Checkbox content control word 2016




checkbox content control word 2016

'A quick macro scratch pad created by Greg Maxey OCustXMLPart.AddNode oCustXMLNode, pStr, _ OCC.Title = InputBox("Enter the title for this CC:", "CC Title") Set oCC = oCCs.Add(wdContentControlCheckBox) Set oCustXMLNode = oCustXMLPart.SelectSingleNode("/ns0:ccMap") 'Define the XML Node that you want to add a child node under. If it doesn't exist use Error Handling to create it. Set oCustXMLParts = oCustXMLParts.SelectByNamespace _

checkbox content control word 2016

'Define a collection of customXMLParts with unique namespace. Set oCustXMLParts = ActiveDocument.CustomXMLParts Set oCCs = ActiveDocument.ContentControls Next I manually inserted another checkbox CC and ran the sub Scratchmacro provided below. If you open a new document and run it, it will insert a mapped CC.

Checkbox content control word 2016 code#

I found some code that creates a mapped CC on the fly so to speak. I've tried every value I can think of and my box stays unchecked. Set ctlReviewExisting = ActiveDocument.ContentControls(4)Ĭ "/Form/ReviewExisting", "", part Trying to set it just like the other controls: In this case, the "ReviewExisting" entry is the checkbox. The XML file contains values, not properties. Them using a CustomXML part (I'm doing this because it's a form filled out on a web page and needs to be in Word for printing, but not editing, purposes) but the checkboxes - how on earth do you get those to check or uncheck when you're binding this way?Īs I understand it, checked/unchecked is a method, and to set it, you set a property (In this case, true/false). The rich text and the text is no problem when I bind Here's the deal - I have a Word 2010 document that consists of a mixture of textboxes, rich textboxes, and checkboxes. This is frustrating me to no end, and it's probably a very simple thing.






Checkbox content control word 2016