using if formulas in mail merge

K

Kaiser Jonesy

I work in employment law and part of my job involves completing contracts of
employment, employee handbooks and mangement guidelines for clients. I would
like to know how I could use mail merge to reduce the time I currently spend
on this? At the moment I use a mail merge were by I answer some questions
with Yes or No and then merge this answer to the Word document. From this I
then delete or leave in the paragraph depending on the answer. How can you
use an If formula in such a way so that it deletes this paragraph
automatically from the word document if the anser is No?

Basically I am looking to design a document builder.
 
G

Graham Mayor

It works better if instead of deleting the paragraph if the answer is no,
you only insert it if the answer is yes.!
You can use IncludeText or Autotext fields to insert the text or simply put
the paragraph in the conditional field.


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
P

Peter Jamieson

I wouldn't see it as "deletion" of a paragraph. In essence you you an IF to
insert or not insert text, graphics and so on.

For example, if you are using an ASK field to get a Yes or No reply and
assign it to a bookmark called "myreply", you might have an IF as follows:

{ IF "{ REF myreply }" = "Yes" "insert all the text and stuff in here,
including any paragraph marks, fields and so on" "" }

All the {} have to be the special field code braces that you can insert
using ctrl-F9. However, if you're using ASK (or FILLIN) fields, be aware
that the user might enter yes, YES, and so on, and they might for example
answer Yes followed by a paragraph mark, and may be surprised when all those
things are treated as "No". You can guard against some, but not all of that
using e.g.

IF "{ REF myreply \*Upper }" = "YES"

(Personally I'd probably stick with "Y" or "N" replies).

It's difficult to give general-purpose advice about constructing a "document
builder" but I am sure plenty of legal firms have been through very similar
processes. You might find the stuff at

http://www.addbalance.com/usersguide/index.htm

and the surrounding material useful, although I don't think it is
specifically to do with form documents.

Some general observations:
a. whenever you capture data (which is what you're doing whenever you ASK
or FILLIN) it's a good idea to ask whehter you just need that data for the
current document, or whether in fact it's information you need to re-use
elsewhere (in which case you shouldn't really be using ASK and FILLIN).
b. ASK and FILLIN and the field language do not have good facilities for
checking data. If for example you need to check that a date is valid, it's
not easy in the field language and you can't easily re-prompt if the date is
invalid. To do that, you would be much better off learning to use Word VBA
Userforms. In my opion, that is also the case if you need to capture more
than a very small number of data items at the start of document production.
c. .doc format documents are not usually reliable long-term copies of the
documents you produce. For one thing, they may contain fields whose values
may change when you re-open the document.

Peter Jamieson
 
K

Kaiser Jonesy

Thanks for this, I hit No at the bottom thinking that is how I reply to the
post.

What I am looking for is a tutorial that also includes screen shots of how
to fill in the Word document so it populates with the paragraphs, as I
understand the basics of mailmerge. The ASK / FILLIN fields would probably
work for me as the document is very simple as the paragraphs that I am
attaching always read the same regardless of which company it is. For
instance, I would ask whether they need a Vehicles and Driving policy for the
handbook, and if the answer is Yes, that standard paragraphs will go in. Each
document would then be saved to the clients file for printing. The document
would then only be used again for reprints and updates when the law changes.

I hope this makes sense!
 
P

Peter Jamieson

The site I suggested before has a tutorial on this subject, but not quite in
the format you are looking for.

http://addbalance.com/word/download.htm

You may also find stuff at

http://word.mvps.org

Graham Mayor's site at http://www.gmayor.com also has loads of useful
material on merging and fields though I think if he had a page on this
specific subject he would have mentioned it already.

It may also be worth checking out the third-party commercial "DataPrompter"
tool by Bill Coan at

http://www.wordsite.com

or

http://www.wordsite.com/products/dpdas.htm

Peter Jamieson
 
G

Graham Mayor

I wonder if this is really a merge at all? Where is the client data coming
from? I suspect (like Peter) that this would be better suited to an
automated document template, with user forms (Word MVP FAQ - Userforms
http://word.mvps.org/FAQs/Userforms.htm) to gather the variable data and
the standard boilereplate paragraphs stored either in autotext entries in
the template or in a separate document (for ease of editing) bookmarked
sections of which can be called into your document on the basis of what is
entered in the userform. This will be a little more effort to set up, but
once configured easier to use.

If you store your client data in an Outlook contacts list, you could call
that data from the template - examples of calling Outlook data can be seen
at http://www.gmayor.com/Macrobutton.htm - in fact you could use macros
attached to macrobutton fields to insert the data if you prefer.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
K

Kaiser Jonesy

The data is coming from a standard questionnaire that we go through with
clients. The questionnaire is on paper so we write it down and then edit the
Word document as necessary. This is very cumbersome and I would like to do
away with the paper copy and just use the Word document as I am on the phone.
The reason I use Mail merge is because it is the only method I am aware of
that lets me add details to a large Word document. I have tried looking into
Boilerpoint and IF fields on Word but can't get my head round setting them
up! That is why I was aksing for guidelines with screen shots to help me.

By the way, this link is not working: http://word.mvps.org/FAQs/Userforms.htm)
 
K

Kaiser Jonesy

I've actually got that link working and I'm going through the Userform
guidelines. I think I see what you are driving at now, never realised there
was so much more possibilitites with Word. Just trying to get my head round
the book mark guidelines as they don't seem too clear. No doubts I will
return with questions, but thanks for my "starter for 10".
 
G

Graham Mayor

A bookmark is essentially a named place within a document. It can be applied
to section of text or a single point.
Bookmarks can be used to place text or to store text to be placed elsewhere
by means of a REF field or an INCLUDETEXT field.
You may find the following links on Greg Maxey's web site useful (as they
provide the screenshots you are looking for).

http://gregmaxey.mvps.org/UserForm_Pass_Data.htm

http://gregmaxey.mvps.org/Populate_UserForm_ListBox.htm

http://gregmaxey.mvps.org/Repeating_Data.htm

http://gregmaxey.mvps.org/Validate_UserForm_TextEntry.htm


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
O

Officeoceans

Good questions Kaiser and good informative answers MVPs ! I'm trying to do
similar things and merge was the first thing that came to mind because I have
repeated variable data. I'm now using a template with AutoText entries and
need to place repeated variable information in those AutoText entries ...
still working on it and looks like the userforms information will be helpful
(I hope).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top