Previous Topic

Next Topic

Book Contents

Book Index

Operation - Using MS Word

MS Word is the document engine used by bcdDocuments to make document templates and to make documents from the templates. The dotm file bcdDocs.dotm has macros required by the program. This file should be placed in MS Word's common startup directory.

In bcdDocuments MS Word can be opened as:

When MS Word is opened from bcdDocuments the bcdDocuments toolbar is also loaded to MS Word. In MS Word 2010 an 2013 it appears in the Add-Ins tab as bcdDocsToolbar.

In This Chapter

The bcdDocuments toolbar in MS Word

Inserting bookmarks in templates

Using macros: caution

Utility macros

Bookmark processing

Gender-plurality

Using gender-plurality in document construction

Previous Topic

Next Topic

Book Contents

Book Index

The bcdDocuments toolbar in MS Word

MS Word is the engine for document production. bcdDocuments uses MS Word bookmarks in templates.

These are the buttons that appear on the bcdDocuments toolbar

bcdDocsToolbar in MS Word. The buttons are used as follows:

Insert data, pick list and macro bookmarks into a document template at the insertion point.

Toolbar_ScanTest Scan a templates bookmarks to report on their validity.

Toggle bookmark brackets [ ] on and off.

Display information about the bookmark containing the MS Word cursor.

Display the bcdDocument variables in a document template.

Print a template with the bcdDocument bookmarks enclosed in [ ] brackets.

Show options such as bookmark and error message colors.

Switch to or open the bcdDocuments program.

When bcdQuickDocs is being used only the last button is available. Otherwise the full set of buttons is available. All nine buttons are useful to those developing and modifying applications and documents whereas only the last button is of use to an operator making documents for matters or clients.

See Also

Operation - Using MS Word

Inserting bookmarks in templates

Using macros: caution

Utility macros

Bookmark processing

Gender-plurality

Using gender-plurality in document construction

Previous Topic

Next Topic

Book Contents

Book Index

Inserting bookmarks in templates

There are several kinds of bookmarks. When you click the button on the bcdDocuments toolbar, a dialog box appears where you can specify the kind of bookmark you want to insert. For each type of bookmark, you can choose from a list of options.

You can choose to show the fields by name or type by clicking the [Show by Name/Type] button.

Insert bookmark

The items in the center of this dialog box are Standard Bookmarks. Each refers to a data field in the Client, Matter or Site database. When dropped into a document template they will, when a document is made from the template, cause the data held in the corresponding field to replace the bookmark.

TEXT and MEMO data takes on the font and formatting of the bookmark replaced. For example if the bookmark is 20 pt Times Roman formatted bold and has color red, the inserted text will be bold and red in 20 pt Times Roman.

FILE data will see a file inserted into the document being made, replacing its bookmark and retaining the formatting of the inserted file. Such files may themselves have bookmarks, including FILE type bookmarks. So document creation can be nested to any depth. Documents can be made which require decision logic by the document maker. By combining macros and nested clauses, some document creation can be automated. All files referred to in FILE fields must be registered using the Document Assistant and located in or in a subfolder of the document template directory.

In the list shown FILESFaxAgent1 refers to a data item of type FILE in the Site database with name FaxAgent1. If this item is selected and the [Insert Standard Bookmark] button pressed the bookmark dropped into the template will be [bmFILESFaxAgent10N] where N is an integer such as 21, meaning this is the twenty first bookmark inserted into the template.

The bookmark appearance [bmFILESFaxAgent1021]in a template indicates its origin.

The dialog box above can also be used to insert

The order in which bookmarks are processed is discussed in Bookmark processing.

See Also

Operation - Using MS Word

The bcdDocuments toolbar in MS Word

Using macros: caution

Utility macros

Bookmark processing

Gender-plurality

Using gender-plurality in document construction

Previous Topic

Next Topic

Book Contents

Book Index

Using macros: caution

By using macros to make documents you can use the VBA (Visual Basic for Applications) capabilities of MS Word.

Caution: Do not use the Selection object in VBA. Only one such object can be used for the ActiveDocument and bcdDocuments will be using it. This appears to be a firm restriction on nested macros in VBA If you need to use a Find object use one from a Range object.

Dim myRange
...
Set myRange = ActiveDocument.Content
or
Set myRange = ActiveDocument
...
(use the range object)
(your myRange.Find code, your myRange.Select code, etc)
or
(your myRange.InsertBefore, myRange.InsertAfter, etc)
...

(when you are finished with the selection object)
Set myRange = nothing

The VBA manual with MS Word warns that there can be only one Selection object.

There can only be one Selection object per document window pane and only one Selection object can be active.

The macros used with bcdDocuments use the selection object. When a macro is called when bcdDocuments is constructing a document the called macro is, naturally, called from a bcdDocuments macro already using the selection object. So do not use the selection object in any called macro. If the selection object is used, experiments show MS Word gives unpredictable results.

See Also

Operation - Using MS Word

The bcdDocuments toolbar in MS Word

Inserting bookmarks in templates

Utility macros

Bookmark processing

Gender-plurality

Using gender-plurality in document construction

Utility macros

Some utility macros are available with bcdDocuments. There are in bcdDocs.dotm. These are simple utility macros which when run insert text at the place in the documents where the macro is inserted.

macroCurrentDate inserts the current date in the format specified by the local short data setting. For example, if the local short date setting is "DD-MMM-YYYY" this macro would insert "05-01-2005" on January 5 2005.

macroCurrentTime inserts the current time as "HH:MM:SS" using a 24 hour clock for the HH part.

macroCurrentTimeDate inserts the current time and date using format "HH:MM:SS, DD MMM YYYY".

macroCurrentYear inserts the current year as a number.

macroCurrentMonth inserts the number of the current month of the current year.

macroCurrentDay inserts the number of the current day day of the current month of the current year.

Once the text for the macro is inserted it does not change when its containing document is opened again. If the containing document is made again then the text for a macro will be inserted to the new document using the current date and or time.

Previous Topic

Next Topic

Book Contents

Book Index

Bookmark processing

Bookmarks are used by bcdDocuments to insert data and subdocuments into documents and to run macros. A sample of bookmark use in a template is shown below. Each bookmark is written in a code. [bmTEXTSCompanyName02] is understood from its parts:

bcdDocs_bookmarks

The order in which bookmarks are processed is:

  1. Handle all GetText bookmarks in the main text section. These bookmarks ask operators for text.
  2. Scan through each Header section and process that section.
  3. Scan through each Footer section and process that section.
  4. Enter the main text body and process that section.

A section is processed as bookmarks are listed in top to bottom order.

If a subdocument is inserted via a PickList or a File bookmark the GetText bookmarks of the file to be inserted are processed before the document is inserted into the parent document. Bookmarks of the file to be inserted will not conflict with bookmarks in the document receiving the subdocuments. Potential conflicts are resolved before copying.

To have a macro run as the last bookmark processed put it at the bottom of the body of the documents, not in a header or footer.

To have a macro run after the GetText bookmarks but before any other bookmark is processed put it in the header of the main document.

See Also

Operation - Using MS Word

The bcdDocuments toolbar in MS Word

Inserting bookmarks in templates

Using macros: caution

Utility macros

Gender-plurality

Using gender-plurality in document construction

Previous Topic

Next Topic

Book Contents

Book Index

Gender-plurality

In any application there may be parties. A matter made with an application with parties may, when editing matter data, set the gender-plurality type of a matter to one of:

In every language, different gender and plural identities are marked by different pronouns, prefixes or suffixes. bcdDocuments can handle this issue for any instance that may occur in the documents you want to produce. Each party is assigned a gender-plurality type when a matter is created. When a document is produced, bcdDocuments uses the Gender Plurality Type of the party to insert the correct form of the words necessary. So the same document template can be used in all instances. In the diagram below the Gender Plurality types used are, in turn, Persons Plural ("...Debtors acknowledge that they will ..."), Male Singular, Female Singular, Corporate Singular, and Corporate Plural.

Here is another example of what a sentence in a document template might look like, where the []'s represent a party bookmark and the party has been assigned a gender-plurality type.

CAUTION: The bookmarks appear ugly in document templates and may be hard to read. When a document has been made the awkward marks a replaced by language making your documents easier to real and personalised with the gender and type of the parties involved in the matters you manage. The advantage of documents using natural language in your documents should outweigh the awkwardness of using these bookmarks by eliminating genderless language.

"The Debtor[bmPARTY_Debtor_2_3] acknowledge[bmPARTY_Debtor_3_4] and declare[bmPARTY_Debtor_5_5] that [bmPARTY_Debtor_6_6] [bmPARTY_Debtor_9_20] indebted to the Creditor[bmPARTY_Creditor_2_7] for the debt."

Where the Debtor has a gender-plurality type of Singular male, and the Creditor has a gender-plurality type of Corporate plural, the above sentence would appear in the generated document as:

"The Debtor acknowledges and declares that he is indebted to the Creditors for the debt."

If the Debtor has a gender-plurality type of Persons plural, and the Creditor has a gender-plurality type of Female singular, the above sentence would appear in the generated document as:

"The Debtors acknowledge and declare that they are indebted to the Creditor for the debt."

If the Debtor has a gender-plurality type of Female singular, and the Creditor has a gender-plurality type of Corporate plural, the above sentence would appear in the generated document as:

"The Debtor acknowledges and declares that she is indebted to the Creditor for the debt."

See Also

Operation - Using MS Word

The bcdDocuments toolbar in MS Word

Inserting bookmarks in templates

Using macros: caution

Utility macros

Bookmark processing

Using gender-plurality in document construction

Previous Topic

Next Topic

Book Contents

Book Index

Using gender-plurality in document construction

To use the gender-plurality features of bcdDocuments in constructing documents the following steps are made:

  1. In your application insert the parties required of the application. When a matter is made these parties will be assigned default gender-plurality types to indicate their language-gender and whether in language they are singular or plural. For example, in an application to manage a lease insert Lessee and Lessor.
  2. In the document template make the text or sentence where gender-plurality text will be inserted.

    For example "The Lessee[s] assert[s] [their] right[s] to require the Lessor[s] ...". The [] markers are places where text depending on the gender-plurality type of the Lessee and Lessor is to be placed.

    If the Lessee is Female singular the line would read "The Lessee asserts her right to require..." whereas if the Lessee is Corporate plural the line would read "The Lessees assert their right to require ...".

    The text fragments, such as "s", "" (no character), "their" or "her" are stored in gender-plurality sets. In these sets the text fragments are packaged or surrounded by the "|" character. Examples of such sets are
    "|s||s|||",
    "||s||s|s|" and
    "|their|its|their|her|his|"
  3. For each gender-plurality type and for each [] above their must be a gender-plurality set in the gender-plurality list. The gender-plurality list is accessed using the Pick List Assistant as menu item Assistants - Pick Lists - Manage the Gender-Plurality list.

    Examine each possible option for text to be inserted into the [] places and insert any new gender-plurality sets in the gender-plurality list using the Pick List Assistant.
  4. Now we are ready to edit the document template and insert party bookmarks to handle the gender-plurality part of document production. Taking the line
    "The Lessee[s] assert[s] [their] right[s] to require the Lessor[s] ..."
    as an example, remove the first [s] and place the cursor after the last "e" in "Lessee".
    The line now reads
    "The Lessee| assert[s] [their] right[s] to require the Lessor[s] ..."

    Using the "Insert bookmark" button of the bcdDocuments MS Word toolbar press the "Insert Party Bookmark".
    First select the "Lessee" party.
    You will then be asked to select a gender-plurality set.
    Select the "|s||s|||" set.

    The line in the document template now looks like
    "The Lessee[bmPARTY_Lessee_5_9] assert[s] [their] right[s] to require the Lessor[s] ..."

    The trailing number will likely differ. Now insert the same choices for the word "Right[s]". The line now looks like
    "The Lessee[bmPARTY_Lessee_5_9] assert[s] [their] right[bmPARTY_Lessee_5_10] to require the Lessor[s] ..."

    For the word "assert[s]" insert a party bookmark for the Lessee but select the "||s||s|s|" gender-plurality set.
    Note the pattern "The Lessee asserts their rights ..." and "The Lessees assert their right" matches the pattern embedded in "|s||s|||", and "||s||s|s|".

You are now investing your time in making future gender specific documentation easier to produce with fewer mistakes so that your documents can read naturally as opposed to genderless language documents.

For the word "[their]" insert a party bookmark for the Lessee party and use the "|their|its|their|her|his|" gender-plurality bookmark.

The line now looks like
"The Lessee[bmPARTY_Lessee_5_9] assert[bmPARTY_Lessee_15_10] [bmPARTY_Lessee_12_11] right[bmPARTY_Lessee_5_11] to require the Lessor[s] ..."

Remove the [s] from "Lessor[s]" and insert a party bookmark for the Lessor party and use the "|s||s|||" gender-plurality set.
The line now looks like
"The Lessee[bmPARTY_Lessee_5_9] assert[bmPARTY_Lessee_15_10] [bmPARTY_Lessee_12_11] right[bmPARTY_Lessee_5_11] to require the Lessor[bmPARTY_Lessor_5_12] ..."

When a matter is made from this application the parties of the application will be assigned to the matter with default gender-plurality types. To make your matter ready to produce gender and singular or plural specific language you need only assign the gender-plurality types to the actual parties of the matter you are processing. This assignment can be done on the Matter data page of you matter.

When a document is made from a document template the awkward appearance of the document is removed and replace with natural language.

See Also

Operation - Using MS Word

The bcdDocuments toolbar in MS Word

Inserting bookmarks in templates

Using macros: caution

Utility macros

Bookmark processing

Gender-plurality