Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-04-2017, 04:53 AM
macropod's Avatar
macropod macropod is offline Add field based on excel data with keyboard shortcut Windows 7 64bit Add field based on excel data with keyboard shortcut Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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
  #2  
Old 01-04-2017, 05:12 AM
Guimenez Guimenez is offline Add field based on excel data with keyboard shortcut Windows 10 Add field based on excel data with keyboard shortcut Office 2013
Advanced Beginner
Add field based on excel data with keyboard shortcut
 
Join Date: Jan 2017
Posts: 33
Guimenez is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
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.
Thanks for replying.
This is what i did:

The files are in my documents folder and i've changed the location on the macro
- created excel file (xlsx) and put in the first columm 10 names
- created doc file and went to macros, create new and past the code above, changing the StrWkBkNm to match my file.
- created a new dropdown and titled it "ID".

But nothing happens, i've close the document and open again the dropdown "ID" is empty.

Do you know what i'm doing wrong? I need it a lot.
Thanks
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add field based on excel data with keyboard shortcut Changing keyboard layout - Changing/removing keyboard shortcut Hans L Windows 2 08-16-2015 05:33 PM
keyboard shortcut ilor OneNote 1 11-13-2014 02:48 PM
disable ctrl+space excel keyboard shortcut melvinjn Excel 2 11-27-2013 04:11 AM
Add field based on excel data with keyboard shortcut Keyboard shortcut for bookmarks Jennifer Murphy Word VBA 1 01-06-2013 07:38 PM
Outlook Keyboard shortcut sostrow28 Outlook 1 12-10-2010 05:57 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:57 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft