Create user specific documents from template using values stored in spreadsheet

Yonk1

New Member
Joined
Sep 13, 2016
Messages
1
Good Morning All,

I’ve been attempting to generate user specific documents from a template, but I cant seem to get it working.

I have all the information in an excel spreadsheet and would like to create a personalised copy of the template for each row of the spreadsheet.

Essentially, the code needs to be able to:


  • Open a .html/.txt file
  • Find 5 separate static value’s within the text file and then replace them with corresponding Values from columns B-F.
  • Save a separate copy of the document using the value supplied in column A as the file name.
  • Close the file.
  • Loop through the previous 4 steps for each row of the spreadsheet.

I've found scripts for performing individual parts of this (E.g find/replace text in a document, "save as" using values from various cells, looping through etc...), however my attempts to combine them have produced some pretty appalling results!

Thanks in advance to anyone who can point me in the right direction.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,620
Latest member
dsubash

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
Back
Top