Dynamic Word Document Generation

Domski

Well-known Member
Joined
Jan 18, 2005
Messages
7,292
Once again I've been given a nice little job to do and am after a bit of advice.

It's coming up to the time of year where we have to send out hundreds of service level agreements. What I've been asked to do is automate the production of the documents to save someone spending days putting them together.

The basic premise is that we would have an Excel workbook that would indicate what services each client takes and then each SLA would then be built up of the relevant sections.

Has anyone got any advice as to the best way to achieve this. I've had all sorts of thoughts from using Access through to HTML but am hoping there's quite an easy way of doing this that I am unaware of.

Thanks in advance for any assistance you can provide.

Dom
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi Dom,

With a correctly set up Excel file, containing client details and fields to indicate which variable aspects of the service level agreements apply, you could easily do this with a mailmerge. To control the content of the output files, all you'd need is an IF test along the lines of:
{IF{MERGEFIELD Var1}= "A" "Text for variable A"}
The output for a given variable could contain multiple paragraphs, and even other mergefields.
 
Upvote 0
Be careful with Date Fields though as they can switch things in Word on Mail Merge Fields.
 
Upvote 0
True but as long as you use a DDE connection this isn't a problem as it pulls the formatting from the Excel file.

Dom
 
Upvote 0
Be careful with Date Fields though as they can switch things in Word on Mail Merge Fields.
I assume you're referring to to day/month order changing. This can be controlled via a formatting switch applied to the mergefield, as can the formatting of numbers and currency values. Indeed, the availability of formatting switches frees you from having to work with the formatting applied to the source data.
 
Upvote 0

Forum statistics

Threads
1,225,482
Messages
6,185,259
Members
453,283
Latest member
Shortm88

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