The “ListFormat” command is a way to format the ‘lists’ of items or paragraphs you insert into your document templates so they look good!
An example of any inline list is:
Inline list example A, b, c and d.
An example of a dot-point or numbered list is:
Dot-point list example a; b; and c.
The difficulty with making your lists look good when using document automation is that you don’t necessarily know how many items you will be inserting. This is when the ListFormat command comes in. The ListFormat command will format lists in your documents accordingly to set rules.
In order to implement the ListFormat command you need 3 components:
- First you need an opening {ListFormatStart} command before the relevant paragraphs;
- Then you need to include the {ListItem} command at the end of each word or paragraph where you want to include the list formatting, i.e. the “,” or “;” or “and”, etc; and
- Finally, you need to include the closing {ListFormatEnd} command at the end of the relevant paragraphs.
An example of a dot-point list using the ListFormat commands:
{MERGEFIELD ListFormatStart:List1 a; b; and c.} {MERGEFIELD TableStart:A} - {MERGEFIELD Field_1000}{MERGEFIELD ListItem:List1} {MERGEFIELD TableEnd:A} {MERGEFIELD ListFormatEnd:List1}
NOTE: You must include the ListFormatStart and ListFormatEnd outside of the TableStart and TableEnd.
An example of an inline formatted list using the ListFormat commands:
{MERGEFIELD ListFormatStart:List1 a, b and c.}{MERGEFIELD TableStart:A}{MERGEFIELD Field_1000}{MERGEFIELD ListItem:List1}{MERGEFIELD TableEnd:A}{MERGEFIELD ListFormatEnd:List1}
NOTE: You must include the ListFormatStart and ListFormatEnd outside of the TableStart and TableEnd.
Naming your lists
Did you notice that you need to name the list? In this case the list is named “List1“, i.e. “ListFormatStart:List1”
You must call each list a different name – so our assembly engine knows when each list starts and ends. You can call a list anything you like. Make it descriptive of the content you are listing, e.g. “InvoiceItems1”.
Available list formats
The list formats that are available through our add-in are as follows:
- a
- a and b
- a, b and c.
- a; b; and c.
- a; b and c
- a; and b; and c.
- a or b
- a, b or c
- a; b or c
The following are optimised for use with lists on new lines only:
- a, b and c
- a; b and c.
- a, b, and c.
- a; b; and c;
- a; b; ; and c;
- a; b; ; and c.
- a; b; ; and c,
- a; b; ;and c;
- a; b; ;and c.
- a; b; ;and c,
Comments
0 comments
Article is closed for comments.