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:
to MS Word
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 .
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
in MS Word. The buttons are used as follows:
Insert data, pick list and macro bookmarks into a document template at the insertion point.
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.
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.
Standard Bookmarksinclude any field specified as Site, Client or Matter Data. The fields for Matter Data are specified in the Application Assistant.
Memo, Document (Clause) and Text Listsare specified in the Pick List Assistant
Text or Dateenables you to ask a question, that requires text or a selection of a date from a calendar response each time a document is made.
Macro to Runenables you to insert you own custom macros into the document production process.
You can choose to show the fields by name or type by clicking the
[Show by Name/Type] button.
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.
bm, FILES, C, FaxAgent1, 0, 21.
bmstands for bookmark, the prefix of all bcdDocuments bookmarks.
FILE, means the data item is a file to be inserted into a document being made, replacing the bookmark. Besides FILE there can be
MEMOin characters three through six. TEXT means a single line or paragraph of text. It can be up to thousands of characters long.
MEMOdata is like
TEXTbut may contain more than one paragraph.
S;it could be
Smeaning the data comes from the Client, Matter or Site database.
FaxAgent1for the name of the data field.
0(zero not "Oh") character marks the character before it as end of the data field name.
The dialog box above can also be used to insert
[Text or Date]When a document is being made, the bookmark will present an instruction asking the operator to insert text or select a date from a calendar. When
[Insert Text or Date]is pressed you will be asked to enter instructions to be given to an operator making a document from the template. In the following dialog box:
[x] Use a date calendar" the resulting macro will ask an operator to select a date from a calendar, and the operator may choose one of several ways to format the date selected. The bookmark will be named "
[ ] Use a date calendar" unchecked, an operator will be asked to enter text. The bookmark will be named "
[Macro]When a document is being made the macro referred to will be run. The effect on the document is whatever the macro specifies. When [Insert Macro to Run] is pressed you are presented with the MS Word macro dialog showing a list of macros known to MS Word. You may select any macro known to MS Word, but you should select a macro know to you. If you select a macro named
MyMacroa bookmark like
[bmRunMyMacro021]will be inserted. If you select a macro named
MyTemplate.MyModule.maina bookmark like
[bmRunMyTemplate_MyModule_main021]will be inserted. When a document is made from the template this macro will be run in the order it appears in the document in the document. The order in which macros and bookmarks are processed is discussed in Bookmark processing.
[Text List]When a document is being made the operator is presented with the text list and asked to select an item from the list. The item selected replaces the bookmark.
[Memo List]When a document is being made the operator is presented with the memo list and asked to select an item from the list. The memo selected replaces the bookmark.
[Document or List]When a document is being made the operator is presented with the document list and asked to select a document or clause from the list. The document selected is inserted in the document being made, replacing the bookmark. Often called a pick list.
[Gender Plurality Bookmark]See Gender-plurality.
The order in which bookmarks are processed is discussed in Bookmark processing.
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.
Set myRange = ActiveDocument.Content
Set myRange = ActiveDocument
(use the range object)
(your myRange.Find code, your myRange.Select code, etc)
(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.
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.
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:
bmfor bcdDocs bookmark;
TEXTfor text data;
Sfor Site data; (
Cis for Client data.
Mis for Matter data.);
CompanyNamefor the Site data field
02for the second bookmark inserted into the template.
[bmTEXTSCompanyName0123]would refer to the same data but is a distinct bookmark.
The order in which bookmarks are processed is:
GetTextbookmarks in the main text section. These bookmarks ask operators for text.
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.
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."
To use the gender-plurality features of bcdDocuments in constructing documents the following steps are made:
"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.
"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 ...".
Assistants - Pick Lists - Manage the Gender-Plurality list.
"The Lessee[s] assert[s] [their] right[s] to require the Lessor[s] ..."
"The Lessee| assert[s] [their] right[s] to require the Lessor[s] ..."
"Insert Party Bookmark".
"The Lessee[bmPARTY_Lessee_5_9] assert[s] [their] right[s] to require the Lessor[s] ..."
"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] ..."
"assert[s]"insert a party bookmark for the Lessee but select th
e "||s||s|s|"gender-plurality set.
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] ..."
"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.