View Single Post
 
Old 05-01-2020, 03:42 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Try the attached Word document and Excel workbook. Upon opening, the document looks for the an Excel workbook named 'PupilData.xlsx' in your documents folder - so that's where you should save the sample workbook for now. That workbook is assumed to have five columns (A-E) on 'Sheet1' for each pupil:
• given name
• family name
• class
• teacher
• attendance
The workbook & worksheet names can both be changed in the macro that drives the process.

As coded, the macro updates the document from the 'PupilData.xlsx' workbook each time it is opened. That, of course means any existing selections are wiped each time. Ideally, though, you'd create a template with the code and make a minor change to it so that it updates only when a new document for a given student is created. We can address that later. Have a play and see if it does what you want.
Attached Files
File Type: docm Pupil Assessment.docm (46.5 KB, 6 views)
File Type: xlsx PupilData.xlsx (10.9 KB, 6 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote