# Populate a form letter in Word Using Excel



## jnow28 (Jun 20, 2012)

So I've tried to teach myself VBA to record macros that will take information from an excel spreadsheet and populate it in a corresponding bookmark in MS Word but no luck. 

Basically I want a button in my excel spreadsheet that I can assign a macro to that will open up a word document for each student and populate a MS Word template with data from the excel file in the correct bookmark location.

In other words, I click the button in Excel, a file in MS Word is opened up for each student that is filled out using the corresponding data from Excel.

If anyone knows the code for all this it would be real helpful.


----------



## ckphilli (Apr 29, 2006)

This should get you started:

http://www.mrexcel.com/articles/excel-to-word-macro.php
http://answers.yahoo.com/question/index?qid=20090427023239AAQVfL3

Additional info can be found by searching google with "macro to create word document from excel".

Good luck!


----------



## Keebellah (Mar 27, 2008)

I would like to help you but you need to do something for me.
For Excel to find where goes what I need a reference in your Word file.
For each variable in the Excel sheet I need you to place the name of the header in [ (square) brackets so that the macro can 'recognize' the location. I've help one or two with similar tissue for Excel -> word.

I notice your Excel file is an xlsx file so that means you're using Office 2007 or 2010.

Why is the word file still in an earlier version an not Docx?
The idea is that the word text looks like this;

Graduation Status Report as of [Name]
Dear Parent /Guardian of [whatever header you have for this field],

and any of the other fields which will have to be populated by Excel, in the table you can make sure the values in the first column just match a row heade name


----------



## jnow28 (Jun 20, 2012)

I'm not sure I quite understand what you want me to do but I will work on it today and resubmit. Thanks!


----------



## jnow28 (Jun 20, 2012)

Is this what you wanted? There are now brackets in the Word document that match the row headers in row 1 of the excel sheet. If I could just put a button in my excel spreadsheet that will run the macro to populate the word document that would be great.



Keebellah said:


> I would like to help you but you need to do something for me.
> For Excel to find where goes what I need a reference in your Word file.
> For each variable in the Excel sheet I need you to place the name of the header in [ (square) brackets so that the macro can 'recognize' the location. I've help one or two with similar tissue for Excel -> word.
> 
> ...


----------



## ssye894 (Jul 5, 2012)




----------

