function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Creating a customized Word document

We are currently creating contracts (in Word) using the mail merge template function.  The problem is that our customers don't want to see language specific to a product they didn't purchase.  Also, we don't want to print every possible product/service that isn't included in the sale.  Creating many, many possible versions of the contract just isn't practical. 

One of my peers has developed a Word document containing macros that parses through the output of the mail merge and includes or excludes sections using bookmarks.  The macro displays a window where the user selects various options that control the customization.  He created this process because he was told that you couldn't mix macros with the mail merge functionality.  It appears to me that you could mix the two but would have to have Office Edition installed.  True or false?

The process this person developed requires too many steps and I fear that our sales people will mess it up and thus proclaim it a failure.  The solution I would like to create would prompt the user for information needed to customize the contract language and then create the output in a single step.  Any thoughts on how I could do this in Word or any other technology? 


It is very possible to mix mail merge and macros. After all, mail merge is performed by internal macros. I designed a system that used over 2,000 input fields in various forms to support a template library with over 20,000 different forms.

I could probably provide you with some ideas, but I need some more information.

How many products are we talking about?

How does the language change for each product?

How static is the product language?

Are there company requirements for the product language, or can the user edit the final document?




java devjava dev

Hi ,

I have two custom objects  quotes & quote lines. quote lines is having master relationship to the quotes object. One quote may have one or more quote lines.

I have to replace quote fields & quote line fields using mail merge.But iam not able to replace quote line fields  & iam successfully replacing quot e fields.

Iam not able to figure out what are the correct template fields for quote lines Because there may be one or more quote lines. I think we have to iterate through out the quote lines objects.

So can u please send me the quote lines template fields & if possible the sample template document also?

If I have to use macros in MS word, can u tell me how to for   my above requirement?

Thank you.