ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Exporting Values into Microsoft Word Form Fields (https://www.excelbanter.com/excel-programming/406080-exporting-values-into-microsoft-word-form-fields.html)

Arnold[_3_]

Exporting Values into Microsoft Word Form Fields
 
I have a workbook with 7 sheets, one for each period of a secondary
school. On each sheet, student last names are in column A (starting
below row 12), and first names are in col. B. Fellow teachers want to
use this but be able to create progress reports for each student,
exporting the values only of the cells in these cols:

A, B, N, O, P, Q, T, AH, AI, and AJ

The headings of these 10 columns, put across row 12, would also need
to be exported.

Users want this info exported into a Word document, with 1 student on
each page. The student names, in A and B, should be put into a field
at the top of each page. The other data could be inserted as a table
near the bottom of each page. The Word doc is a form that contains
text fields and checkboxes.

How could this be coded?

A catch is that there is a blank row between each student's data in
the workbook (student across row A15, another across A17, A19, etc.)

Also, this would have to export data from each of the 7 worksheets.

Lastly, users want a macro/menu that, when clicked, would output data
for all students, and another macro that would only output data for
the student that is currently clicked on (anywhere in that student's
row).

Thanks a great deal for any help.

ryguy7272

Exporting Values into Microsoft Word Form Fields
 
I think this is what you're looking for:
http://word.mvps.org/FAQs/InterDev/C...WordFromXL.htm

I use this code all the time; works great!!

Regards,
Ryan--

--
RyGuy


"Arnold" wrote:

I have a workbook with 7 sheets, one for each period of a secondary
school. On each sheet, student last names are in column A (starting
below row 12), and first names are in col. B. Fellow teachers want to
use this but be able to create progress reports for each student,
exporting the values only of the cells in these cols:

A, B, N, O, P, Q, T, AH, AI, and AJ

The headings of these 10 columns, put across row 12, would also need
to be exported.

Users want this info exported into a Word document, with 1 student on
each page. The student names, in A and B, should be put into a field
at the top of each page. The other data could be inserted as a table
near the bottom of each page. The Word doc is a form that contains
text fields and checkboxes.

How could this be coded?

A catch is that there is a blank row between each student's data in
the workbook (student across row A15, another across A17, A19, etc.)

Also, this would have to export data from each of the 7 worksheets.

Lastly, users want a macro/menu that, when clicked, would output data
for all students, and another macro that would only output data for
the student that is currently clicked on (anywhere in that student's
row).

Thanks a great deal for any help.


Arnold[_3_]

Exporting Values into Microsoft Word Form Fields
 
Thanks RyGuy


All times are GMT +1. The time now is 07:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com