updating data in MS Word document

minnman

New Member
Joined
Oct 16, 2006
Messages
2
I have an Excel spreadsheet that contains data that I am trying to write to MS word documents. Basically, if there are 10 rows of data in the spreadsheet then I must create 10 new Word documents. All of the wording in each Word document is the same. Only the data changes. I have created a Word document and bookmarked the places where each relevant data should be inserted. I would very much appreciate any help on how to write the VBA macro. I have code which will loop through the rows in the spreadsheet but need help with opening a Word doc, updating the bookmarked places with data, and closing the document. Thank you very much in advance to anyone offering to help. :confused:
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,303
Office Version
  1. 365
Platform
  1. Windows
Why not just use Word mail merge?
 

minnman

New Member
Joined
Oct 16, 2006
Messages
2
Thanks very much for your response.
I didn't know that Word mail merge could do that.
The source spreadsheet may contain a few hundred rows of data which means I will end up with the same number of Word documents. Each Word document must have a name that consists of two of the columns on the row. Can Word mail merge do that?
 

Forum statistics

Threads
1,141,097
Messages
5,704,313
Members
421,338
Latest member
Pepess

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top