

Slide masters in PowerPoint 2016 for Mac.To set specific properties for the control, click Options, and then configure the properties that you want. On the Developer tab, click Text Box, Check Box, or Combo Box. In the document, click where you want to add a content control. On the File menu, click New from Template.ĭouble-click the template you want to use. Or, to save time, you can start with a form template. You can start with a blank document and create your own form. Step 2: Open a template or use a blank document Under Ribbon, check the Show developer tab box. Under Authoring and Proofing Tools, click View. Create a form from a template or from scratch

In a combo box, users can select from a list of choices that you provide or they can enter their own information. Other people can use Word to fill out the form and then print it if they choose to. The file does exist and column A of sheet1 has data from A1 down to A106.You can create a form in Word by starting with a template or a new blank document and adding content controls, including check boxes, text boxes, and combo boxes. When I run the macro I get the error message: "Run-time error '1004': Application-defined or object-defined error". I changed the location for the StrWkBkNm file.
#WORD FOR MAC COMBO BOX CODE#
I created a macro on Word called Dropdownlist and I pasted the suggested code there. I wanted to fill it with a list of clients that I have on column A of Sheet1 on an Excel file called "Clients List". I named the dropdown list as "Clients" and it has no options entered yet. I have a word template file with just one dropdown list created. Hi, was asking about the very first code on this thread (I'm sorry if I didn't place my question correctly). MsgBox (1).IDYou can run either from the VB Immediate window.
#WORD FOR MAC COMBO BOX INSTALL#
via Alt-F8>UpdateDropDown>OK).įor PC macro installation & usage instructions, see: Installing Macrosįor Mac macro installation & usage instructions, see: Word:mac - Install a MacroĬode: Debug.Print (1).ID UpdateDropDown) so that it will only run on demand (e.g. Alternatively, you could rename the macro (e.g. You can do that just by saving it as a template (once you've made the code change but before you've made any selections or other edits that you don't want to appear in every new version of this document). You may need to create a specific template for this document. To prevent that, change the macro's name from 'Document_Open' to 'Document_New' and add it to the document's template. Note: For the above code to work, every Dropdown List Entry and every Dropdown List Value must be unique.ĭo be aware that the above code will re-populate the dropdown every time you open the document, wiping out whatever you'd previously selected. Set xlWkBk = Nothing: Set xlApp = NothingĮnd SubIf you use the code to populate the content control's 'value', you can then supplement the above code with a content control on-exit macro to populate a dependent content control with that 'value'. '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
