View Single Post
 
Old 01-04-2017, 04:53 AM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,373
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I take it you added the macro to the Word document, not to the Excel workbook. The macro runs automatically when you open the document - no user action is required. For it to work with the macro as coded, though, your Word document must have a dropdown content control titled 'ID' - though you could use a different title (provided you use the same title in the document and in the code). Note also that the macro looks for a workbook named 'Workbook Name' (of all things) in your 'Documents' folder. You can change both the filename and folder.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote