Microsoft Word

Once in the Microsoft Word editor, all the functions of Word are available to use in your template, such as graphics, tables, styles, hyperlinks and so on. For more information on editing documents in Microsoft Word consult the Microsoft Help by pressing the F1 key whilst in the Microsoft Word editor.

 

No support, advice or maintenance services will be provided by us with respect to Microsoft Word. However, we may, from time to time, give you reasonable advice or technical support on an ex gratia basis only. This means that, as the software is not ours, we may, at our sole discretion, try to help you with respect to it. We will not charge you for such help, which will be provided as Extra Contractual Support as defined in clause 4.6 of the terms and conditions of our Annual Software Licence and Customer Service Agreement.

 Contents:

Field codes

When using Microsoft Word for editing AutoMail templates, it is recommended that field codes are switched on. Select Tools | Options and tick the Field codes box on the View tab to switch them on.

 

With field codes switched on it is possible to see the full content of the template, including formatting of tags, items in if then else statements and more.

 

Back to top


 

Editing the document

Begin typing the text of the letter into the document template. The template formatting will be based on the formatting set in Microsoft Word, and the addition of tables, graphics, styles and so on will all be reflected in the template if they are produced in Word.

For more information on editing documents in Microsoft Word consult the Microsoft Help by pressing the F1 key whilst in the Microsoft Word editor.

 

Back to top


 

Adding tags

A tag is a piece of information that can be linked from the IRIS database which can be merged into the letter as text.

To add tags from the IRIS database, it is necessary first to have selected the appropriate tags from the Tag Selection screen. Once the appropriate tags are selected, they can be inserted into the document by clicking Insert Merge Field.

In Word 97 and 2000, this is an option called Insert Merge Field. In Word 2002 and above, it is the square button with horizontal lines across it, just to the left of Insert Word Field.

 

Select the required tag from the list to place it into the document at the point where the cursor is.

Assuming field codes are turned on, the tag will look something like this:

 

{ MERGEFIELD "LMCLAgentName" }

 

The formatting of the tag will be reflected in the output. For example, if the tag is in a bold font, then the substituted information will also be produced in a bold font.

 

Back to top


 

Inserting document dates

To insert the current date into the document,

  1. Select Insert | Field and select Date.

  2. Select one of the formats from the list and click OK.

This will insert a date field into the document. It is recommended that the save date is used.

 

Further information on the formatting on dates can be found within Microsoft Help.

 

Back to top


 

Arithmetic and formatting numbers

It is possible to perform arithmetic on values transferred from the IRIS database, for example adding the tax liability to the first payment on account.

 

To create a formula for Arithmatic using Microsoft Word 2000, XP & 2003:

  1. From the Microsoft menu, select Insert.

  2. From the sub-menu, select Field.

  3. Select = (Formula) from the list.

  4. In the Formula box, leave the = sign where it is, and after it enter a dummy sum such as A+B or similar.

  5. Select one of the Number formats from the drop-down list. For example, the number format #,##0.00 will print the number with a comma separator for the thousands, and then print the number to two decimal places

  1. Leave the Paste function field blank, and click OK to enter the formula into your document.

  2. You should have a formula similar to the following: { =A+B \# #,##0.00 }.

  3. Delete the dummy sum A+B and replace it with the tags from the IRIS database you wish to perform arithmetic on (see the section on adding tags), using the + (plus),- (minus),/ (divide) and * (multiply) symbols as necessary.

    An example would be as follows:

{ = { MERGEFIELD "LMCLCYrBalLiab" }+{ MERGEFIELD "LMCLNYrOAC" } \# #,##0.00 }

 

For Microsoft Word 97 users, the formula entry area will be underneath the two field selection panes.

If this is the case:

  1. From the Microsoft menu, select Insert.

  2. From the sub-menu, select Field.

  3. Select = (Formula) from the list.

  4. Where the = sign is, type a dummy sum, for example, A+B immediately after it. If you do not require any custom formatting, then click OK to create the formula.

  5. If you want the number to be formatted differently, enter a space after the dummy sum then type \# and another space, then enter the numeric picture field you wish to format the number with. For example \# #,##0.00 will format the number with a comma separator for the thousands, and to two decimal places.

  1. Click OK to enter the formula into your document. You should have a formula similar to the following:{ =A+B \# #,##0.00 }.

  2. Delete the dummy sum A+B and replace it with the tags from the IRIS database you wish to perform arithmetic on (see the section on adding tags), using the + (plus),- (minus),/ (divide) and * (multiply) symbols as necessary.

    An example would be as follows:

{ = { MERGEFIELD "LMCLCYrBalLiab" }+{ MERGEFIELD "LMCLNYrOAC" } \# #,##0.00 }

 

 

The formatting of the tag will be reflected in the output. For example, if the tag is in a bold font, then the substituted information will also be produced in a bold font.

 

If only a single tag is specified after the = sign, then that value will be placed in the document, subject to the format specified by the \# switch.

 

Back to top


 

Fill-ins

It is possible to set up the template so that information can be entered at the time of generating the Fees document. For example, it is possible to prompt for an account period end in an invoice narratvie. This is achieved by creating a FILLIN field.

 

To insert a FILLIN field into a document:

  1. Click Insert Word Field.

  2. From the sub menu, select Fill-in...

  3. In the Prompt box, enter the text the user will be prompted by, for example, Enter your reference.

  4. In the Default fill-in text box, enter (if required) a default entry for the fill-in field. If this box is left blank then no default entry will be provided, but if text is supplied then the user has the option to enter their own alternative text at merge time.

  5. Select the Ask once option if the system should only prompt once for each merge, rather than each individual letter. If 100 letters are generated and the Ask once option has been selected on the fill-in, the system will only prompt for text entry once and will enter the same text on all 100 letters.

  6. Click OK to create the FILLIN code.

  7. The system will display how the prompt will look with default text. Click OK again to insert the FILLIN code into the document.

    It will look similar to the following (assuming field codes are turned on):

    FILLIN "Enter your reference here" \d "Your ref" }

The formatting of the tag will be reflected in the output. For example, if the tag is in a bold font, then the substituted information will also be produced in a bold font.

 

Back to top


 

If-then-else statements

It is possible to insert text subject to evaluation of a condition within the template code. For example, different paragraphs of text could be printed on the same letter depending on whether the client is a business or a personal client. The main tool in creating conditional text is the IF statement.

 

To create an IF statement:

  1. Click Insert Word Field.

  2. From the sub-menu, select If...Then...Else...

  3. Select the field that will be evaluated in the Field name box. The field required must have already been added to the template in the Tag Selection screen. For example, {LMCLIsbusiness} is the tag for is a business client.

  4. In the Comparison box, enter the evaluation that will be performed. Typically this will be Equal to, but other options are available.

  5. In the Compare to box, enter the expression to compare the field selected to. In this example, type 1 if it is a business client you could type  0 if it isn't a business client).

The top line of the IF screen should now read as an evaluation.

  1. In the Insert this text box, enter the text that should be placed in the document if the evaluation is true for the client at the time of merge. in this example, any text written in this box will appear if it is a business client. In this example, type 'business' and  the word will appear if the document is generated for a business client.  

  1. In the Otherwise insert this text box, text can optionally be entered that will be placed in the document if the evaluation is false for the client at the time of merge. If left blank then no text will be printed if the evaluation is false. In this example, type person text would appear if the document is produced for a personal client.

  2. Click OK to create the if statement and insert it into the document code.

    It will look similar to the following (assuming field codes are turned on):

    { IF { MERGEFIELD LMCLIsBusiness } = 1 "business" "person" }

Tags can then be inserted into the if...then...else... statement if required.

The example below shows how a business name tag can be inserted if the client is a business.

  1. The text { IF { MERGEFIELD LMCLIsBusiness } = 1 "business" "person" } will be displayed, following steps 1 to 9 above.

  2. The text in the first quotation marks is displayed if the evaluation is true and the text in the second quotation marks is false. Place the curser between the quotation marks for business.

  3. You can then add the business name tag. Click here for help on inserting tags.

 

The formatting of the tag will be reflected in the output. For example, if the tag is in a bold font, then the substituted information will also be produced in a bold font.

 

It is also possible to combine an IF statement with a FILLIN. This will compare the text the user enters when prompted to an expression, and will then insert the appropriate text dependent on the user's response.

 

To create an IF-FILLIN combination, create an IF statement as shown above (using any field in the Field name box)and replace the { MERGEFIELD } command with a FILLIN command, detailed above.

An example of this usage would be as follows:

{ IF { FILLIN "Enter 0 for person, 1 for business" \d "0" } = 1 "business" "person" }

 

Back to top


 

Ask statements

Ask statements can be used when you need a prompt to appear with a number of outcomes and for this to be automatically inserted into the document.

For example, when a producing an invoice, a user may be asked 'Please select a narrative: Personal Tax=1, Accounts=2, Audit=3, Business Tax=4.

When a user types 3 then the narrative for Audit will automatically be inserted into the document.

 

Ask statements are used in combination with IF statements to insert text subject to a user-entered condition where more than two choices are given.

 

 

Creating an ASK-IF combination involves 4 steps.

 

Step 1 - Create an Ask statement

  1. Select Insert Word Field.

  2. From the sub menu select Ask...

  3. In the Bookmark field, enter a name for the bookmark. This name must be unique on the template. A list of bookmarks already used will appear underneath the field. In our example we are calling the bookmark BTP.

  4. In the Prompt field, enter the text the user will be prompted by. For example, 'Please select a narrative: Personal Tax=1, Accounts=2, Audit=3, Business Tax=4 '.

  5. In the Default bookmark text box, you can enter a default option to set the bookmark to. This value will be placed in the text entry box at the time of merge, and can then be overtyped by the user if they want to choose an alternative option. If you leave this box blank, no default option will be specified.

  6. Select the Ask once option if the system should only prompt once for each merge, rather than each individual letter. If 100 letters are generated and the Ask once box has been selected on the ask statement, the system will only prompt for text entry once and will set the bookmark to the same value on all 100 letters.

  7. Click OK to create the Ask statement. The system will display how the prompt will look with default text.

  8. Click OK again to insert the ASK code into the document.

    It will look similar to the following (assuming field codes are turned on):

{ ASK BTP "Please select a narrative: Personal Tax=1, Accounts=2, Audit=3, Business Tax=4 " }

 

Step 2 - Create an IF statement

You will need to create the IF statements required to evaluate the bookmark. More than one IF statement will be required since each IF statement will only evaluate to true or false, and the bookmark has more than two potential options.

  1. Insert an IF statement as described in the above section, using any available field in the Field name box. You should insert the IF statement immediately after the ASK statement already entered.

In our example, the first IF statement will test to see if the bookmark is equal to 1(for personal tax invoice).

  1. In the Compare to box, enter the value 1.

  2. In the Insert this text box enter the text "To professional services in relation to the preparation of accounts and dealing with tax matters in general".

  3. In the Otherwise insert this text box, enter any text, for example, "false".

The ask statement and the if statement will look as follows, the IF statement is highlighted in red:

 

{ IF { MERGEFIELD LMCLClientName } = 1 "To professional services in relation to the preparation of accounts and dealing with tax matters in general" "false" }

 

Step 3 - Amend the bookmark in the if statement

  1. Delete the { MERGEFIELD LMCLClientName } section from the if...then...else statement (or whichever field name you have used).

  2. Replace it with the name of the bookmark specified in the ASK statement earlier.

    In this example, the bookmark was BTP (and has been highlighted in red):

{ IF BTP = 1 "To professional services in relation to the preparation of accounts and dealing with tax matters in general" "false" }

 

Step 4 - Insert an IF statement into the second conditional

  1. Delete the word false from the IF statement and then insert in its place another IF statement:

{ IF BTP = 1 "To professional services in relation to the preparation of accounts and dealing with tax matters in general" "false" }

  1. In the Compare to box, enter the value 2.

  2. In the Insert this text box enter the text 'in relation to the preparation of accounts and dealing with tax matters in general'.

  3. In the Otherwise insert this text box, enter the final option false.

    The statement should now look similar to the following:

{ IF BTP = 1 "To professional services in relation to the preparation of accounts and dealing with tax matters in general" "{IF { MERGEFIELD LMCLClientName }  =2 "To professional Fees in relation to the preparation of accounts and dealing with tax matters in general." "false" }" }

 

  1. Finally, delete the { MERGEFIELD LMCLClientName } section (or whichever field name you have used) again, and replace it with the name of the bookmark specified earlier, in this case BTP:

{ IF BTP = 1 "To professional services in relation to the preparation of accounts and dealing with tax matters in general" "{IF BTP =2 "To professional Fees in relation to the preparation of accounts and dealing with tax matters in general." "false" }" }

 

The ASK-IF combination together should look similar to the following:

{ ASK BTP "Please select a narrative: Personal Tax=1, Accounts=2, Audit=3, Business Tax=4 " }{ IF BTP = 1 "To professional services in relation to the preparation of accounts and dealing with tax matters in general" "{IF BTP =2 "To professional Fees in relation to the preparation of accounts and dealing with tax matters in general." " false" }" }

 

You will then need to repeat this for the remaining narratives for Audit and Business Tax.

  

 

The formatting of the tag will be reflected in the output. For example, if the tag is in a bold font, then the substituted information will also be produced in a bold font. However, the formatting of the ASK statement is ignored, since it does not resolve into any particular text within the document. Only the formatting of the IF statement in the ASK-IF combination will be adopted in the merged document.

 

Back to top


 

Related topics

Fees documents reference

Microsoft Word hints and tips

Standard Word templates

Create a bespoke template

Fees document options

Fees template registry

Create a new template

Tag Selection screen

Fees template context types

Fees template tag listing

Template properties