Integration With Microsoft Word

This article discusses Method Number Two which allows for integration with both Microsoft Word and Word Perfect.  However, once again we recommend using the built in word processor in A1-Law.  See the pros and cons of using Word, Word Perfect and the A1-Law built in word processor.  A1-Law now offers two ways to integrate with Microsoft Word.

The important thing to realize is that A1-Law automatically knows all of the documents that were created with either Word, Word Perfect, or court forms.  A1-Law will automatically display these letters and forms when you click a button from either saved letters or from the case activity and you never need to worry about folders or naming the documents.  A1-Law does all of this work for you which removes confusion when you want to view a letter or court form.

Two Ways A1-Law Integrates With Microsoft Word
A1-Law now fully integrates with Microsoft Word in two different ways.

The Bookmark Method - Method Number One
The first way uses bookmarks in Word and this has been available since the first release of A1-Law.  Therefore, we refer you to either the A1-Law manual or help files for more information on integrating with Word bookmarks.  Integration with bookmarks may allow for slightly "tighter" integration at this time but for most users it's too complicated and takes too much time to create a letter in this way.  Therefore we decided to create a second and easier method of integration.

Method Number Two / Word and Word Perfect Integration
This new method now available in Version 4.1.0 is much easier to integrate with A1-Law than the bookmark method.  Also, this exact same method is available to you in Corel Word Perfect as well.  We will explain it with an example below.  The ideas behind this implementation are quite clever but the end result allows for rapid creation and integration with either Word or Word Perfect.  What's truly amazing is the corresponding letter you print in A1-Law which automatically merges with either Word or Word Perfect can be as short as 3 lines.  We demonstrate this at the end of this article.

Here's the idea, first, we recommend you create a folder under A1-Law called either Word or WP if the folder has not already been created (for your word processing documents).  Do not use long filenames for the name of the folder since we have not tested this yet.  Just use something simple like either A1Law\Word or A1Law\WP.  You may use long filenames for the names of the documents in either Word or Word Perfect.

Create your document in either Word or Corel Word Perfect.  Now, let's say you want to merge today's date, the client's name and address, and the case caption in the document.  You may insert the following in either Word or Corel Word Perfect:

For example, the Word or Word Perfect document may contain the following:


This is a test of my document and as you can see, the name of the client is listed below.


The case caption is listed below:


Just put the above codes anywhere you like in the document and as many times as you would like it to appear in the document, give it a filename and save it.  Now, we want A1-Law to find the Word or Word Perfect document, replace the codes with the information for the client card we are at, create a new letter from the document and automatically attach it to the problem.

But, the first question that comes to mind is how do we know to put codes like <<<DateToday>>> in the Word or Word Perfect document?  The answer is we decide what those codes are in the corresponding A1-Law document.

We create a letter in A1-Law that contain those codes along with information about the Word or Word Perfect document to merge.  For example, let's use letter number 10 in A1-Law.  We insert the following in letter number 10:

For example, letter #10 in A1-Law contains the following:

WordStyle = 2
Path = f:\A1Law\Word
FileName = DepoLetter.Doc

{FieldName = ClientNameAddress
<<command = client>>}

{FieldName = CaseCaption
<<command = caption,FromApps>>}

{FieldName = DateToday
<<command = date>>}

There are several things to notice.  First, as mentioned above, we decide what to name the fields.  Second, a fieldname is not limited to one A1-Law command or one line.  The fieldname is on the first line and the lines that follow, contain the information to merge into the document until A1-Law sees an ending parenthesis which ends the fieldcode date to merge.  Third and most important of all, the fieldnames may be placed in an entirely separate letter (for example, letter number 1000).  Then, you may use the Merge command to merge all the fieldnames from another A1-Law letter.  This is strongly recommended for several reasons.  First, it allows you to easily use the same fieldnames in all of the letters that you integrate.  Second, if you change a fieldname , the change will be reflected for all letters that are integrated.  Third, you don't have to retype the fieldnames, information and A1-Law commands for those fieldnames in every letter.

Next, notice the Path command.  This should also be merged from another letter since all of your Word or Word Perfect documents will probably be in the same folder.  You should put the path command in the same main letter where all the Fieldname commands will be.

Three Lines of Code
We are now ready to demonstrate how easy it is to create documents in either Word or Word Perfect that merge beautifully with A1-Law.  If all of the above information (the Fieldname commands and Path command) were in a different letter like letter 1000, the above letter number 10 could be shortened to the following:

WordStyle = 2
FileName = DepoLetter.Doc
<<command = merge 1000>>

You may be wondering what happened to the DebugOn command?  This is useful when you want to be sure that there were not fields in the Word or Corel document that were not found in the corresponding A1-Law document.  However, once the document works, you may just remove the DebugOn command since you will want it off and the default is DebugOff.

That's really all we need.  Now, whenever anyone prints letter number 10, A1-Law knows the filename of the Word document.  It also knows the path because in our above example, the path is merged from letter 1000.

Warning: you must have a space on both sides of the equal sign in the above commands.

One Minor Problem
When we print this letter, it's still using the A1-Law word processor.  This is actually a good thing because we may examine the fieldnames and make sure that the A1-Law commands are printing what we want to be merged in the Word or Word Perfect document.  Once we have examined the information and we have created a Word or Word Perfect document, we will be ready to tell A1-Law to actually load, copy, merge the information, and attach it to the case.  We double click on the letter to edit and where we would change the title of the letter there is also a Type dropdown.  We change the type from A1-Law to Word or Word Perfect.  Click save and print the letter and A1-Law does the rest.

Final Comments
Instead of the WordStyle = 2 We use the:

WordPerfectStyle = 2

for Word Perfect letters and we click the dropdown to Word Perfect instead of A1-Law or Word and A1-Law will then automatically integrate with Corel documents.

With either Word or Word Perfect we may use different field delimiters with these commands (as an example):

fieldstart = [[[
fieldend = ]]]

or we may use the same start and end delimiters as in the following example:

fieldstart = ///
fieldend = ///

Unless you have some important reason, we just recommend that you not bother with fieldstart and fieldend and just use the default delimiters.  A1-Law uses as a default fieldstart = <<<  and A1-Law uses fieldend = >>>

Either way, you should use the same delimiters in all of your integrated documents.  So, if you choose to use different delimiters, the fieldstart and fieldend commands may also go in your document to be merged (this would be form letter 1000 in the above example).