'ActiveDocument.SelectContentControlsByTitle("ID")(1).DropdownListEntries.Add _ 'or, for example, to add the contents of column B to the content control's 'value': ' content control Text and the values from columns B-E as the content controlĪctiveDocument.SelectContentControlsByTitle("ID")(1).DropdownListEntries.ClearĪctiveDocument.SelectContentControlsByTitle("ID")(1).DropdownListEntries.Add _ ' Populate the content control titled 'ID', with Column A for the 'ID' as the Workbooks.Open(FileName:=StrWkBkNm, ReadOnly:=True, AddToMRU:=False) MsgBox "Cannot find the designated workbook: " & StrWkBkNm, vbExclamation StrWkBkNm = "C:\Users\" & Environ("Username") & "\Documents\Workbook Name.xls" 'Note: A VBA Reference to the Excel Object Model is required, via Tools|Referencesĭim xlApp As New Excel.Application, xlWkBk As Excel.Workbookĭim StrWkBkNm As String, StrWkShtNm As String, LRow As Long, i As Long
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |