VBA Code

Dim oCC As ContentControl 
oCC = ActiveDocument.ContentControls.Add(wdContentControlType.wdContentControlDate)
oCC.Range.Text = VBA.Date()

IDReadonly. Unique identifier for this content control in this file. This ID is not globally unique across files
TypeReadonly. The type of content control
LocationReadonly. The location of the content control in the document. The possible locations are: MainDocument, Header, Footer, Comments, End Notes, FootNotes
TitleEditable. The title of the control. This is visible when you hover over the control
TagEditable. The tag for containing useful information
XPathEditable. This refers to the leaf element or attribute in a custom XML part to create the mapping between the surface document and the data store. You should really drag nodes from the "Custom XML Parts" task pane to automatically create these mappings
PrefixMappingsEditable. The prefix mapping is the namespace shorthand and the actual namespace used in the XPath.
Custom XML IDEditable. The globally unique identifier for the Custom XML Part
NamespaceReadonly, The namespace


objRange.ContentControls 

objDocument.SelectContentControlByTag
objDocument.SelectContentControlByTitle

objContentControl.BuildingBlockCategory
objContentControl.BuildingBlockType
objContentControl.DateCalendarType
objContentControl.DefaultTextStyle
objContentControl.DropDownListEntries
objContentControl.ID
objContentControl.LockContentControl
objContentControl.LockContents
objContentControl.MultiLine
objContentControl.MultiLine
objContentControl.ParentContentControl
objContentControl.PlaceholderText
objContentControl.Range
objContentControl.Tag
objContentControl.Temporary
objContentControl.Title
objContentControl.Top
objContentControl.Type
objContentControl.XMLMapping

Document.BuildingBlockInsert


Design Mode

If (ActiveDocument.FormsDesign = True) Then 
   MsgBox("Document is in design mode")
End If



© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrev