VBA Code
Dim oCC As ContentControl
oCC = ActiveDocument.ContentControls.Add(wdContentControlType.wdContentControlDate)
oCC.Range.Text = VBA.Date()
ID | Readonly. Unique identifier for this content control in this file. This ID is not globally unique across files |
Type | Readonly. The type of content control |
Location | Readonly. The location of the content control in the document. The possible locations are: MainDocument, Header, Footer, Comments, End Notes, FootNotes |
Title | Editable. The title of the control. This is visible when you hover over the control |
Tag | Editable. The tag for containing useful information |
XPath | Editable. 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 |
PrefixMappings | Editable. The prefix mapping is the namespace shorthand and the actual namespace used in the XPath. |
Custom XML ID | Editable. The globally unique identifier for the Custom XML Part |
Namespace | Readonly, 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