See: Install/Employ VBA Procedures (Macros)įor instructions to employ the VBA code provided above. ORng.Start = Selection.Tables(1).Range.End If MsgBox("Do you want to loop to the first control?", vbQuestion + vbYesNo, "Router") = vbYes Thenįor Each oCell In Selection.Tables(1).Range.Cells (1).Range.Selectĭo Until Selection.Cells(1). > 0 The focus does not advance to the next control. Using the tab key in one of these controls enters a physical tab in the control as expected. The following example shows three rich text content controls grouped (nested) in a restricted content rich text control container. Rich text controlsįirst let's look at problems associated with rich text controls. VBA complains with a compilation error: 'Object Required. I came to the following code to identify the checkboxes. As a first step in this task I am trying to recognize when a table cell contains a checkbox, and then read the status of the checkbox: checked or unchecked. Unfortunately navigating between content controls in documents containing rich text or picture content controls is more problematic. The Word files are already available and their format cannot be changed. Note: If there are one or more content controls in the document after your assigned "Last" content control then the focus will be set automatically to the content control tagged "First" when you tab out of the "Last" control. Then when you finish in the last content control simply click anywhere in the document and the to exit the content control and the focus will be returned to the content control tagged "First." ![]() '"First" = tag property applied to the first control.ĪctiveDocument.SelectContentControlsByTag("First").Item(1).Range.Select Its time to replace ‘Diversity, Equity & Inclusion’ with ‘Excellence, Opportunity & Civility’ - V. Hope this helps, Doug Robbins - MVP Office Apps & Services (Word). '"Last" = tag property applied to the last control. If it is a Content Control CheckBox, you can select it and change the size of the Font to make it larger. Ive been reading about macros and all kinds of crazy stuff and Im a novice to Word and computers. ![]() Im attempting to make it so when one box is checked from a row, anything else selected is unchecked. Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) I have multiple check boxes in different cells of a table on Microsoft Word 2010.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |