Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-03-2020, 10:16 PM
Guessed's Avatar
Guessed Guessed is offline Word form that auto-populates (from Excel sheet) other content controls based on one,manually filled Windows 10 Word form that auto-populates (from Excel sheet) other content controls based on one,manually filled Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,164
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I didn't give you feedback on the various other inputs you are taking. I think you are being drowned in information from some very different approaches and end targets. All are very useful as study tools but some may not suit your actual requirements particularly well.



The youtube 'Push Data from Excel to MS Word Content Controls using Excel VBA' video shows a simplistic method of pushing your data to Word. If you had an understanding of that code, you could rewrite it to run from Word to 'pull' the data across. You would however need to be a lot smarter about getting the right data to go into the right CC - and that would need more code.

The youtube 'How to use ADO and VBA to Read from Worksheets' gets you access to the Excel recordset and from there you are going to have to work out how to align the matrix of records x fields with locations in your document where those particular values need to go. A recordset allows you to grab the data quickly and also to search through it for a particular record or assigned sort order but it doesn't help you align that content with the locations in your document.

In the case of Greg's inputs - he is showing you code to write all the records (a column from Excel) as entries in a single Dropdown Content Control. This will effectively be a single 'name' in the Word document and you can click on the CC and choose a different name. The earlier code showed a method of taking that chosen name and transferring the associated 'row' data into other CCs in the document. This ultimately gives you a single record's worth of data in the Word doc but not all the records (rows) at once.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply

Tags
word fields, word vba, word vba macro



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word form that auto-populates (from Excel sheet) other content controls based on one,manually filled Reset "Button" to clear Word user-filled form, from all filled details. Rafi Word VBA 20 01-20-2023 02:16 PM
Word form that auto-populates (from Excel sheet) other content controls based on one,manually filled VBA to Populate text content controls in word from excel lmoir87 Word VBA 15 05-27-2022 04:22 PM
Auto populate form (data from excel) in Word based on drop down list selection (data from excel) wvlls Word VBA 1 03-22-2019 02:29 PM
Form with content controls - expands but at the bottom of the form louiseword Word 3 05-27-2016 12:47 AM
Word form that auto-populates (from Excel sheet) other content controls based on one,manually filled Date auto-populates based on checkbox mcarter9000 Word VBA 5 12-23-2010 12:39 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:39 AM.


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