Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Although the document can only be saved as .doc if MS Word is installed. MS Word is not necessary to carry out some of the basic template functionality as this is done on a Rich Text Document format. However, when Word automation is required (in case of creating tables using the TELITAB2WORD$() function, or building a document based on several separate documents or Word macro's), MS Word will be required.
  2. To use all the advantages of the MS Word integration, the use of VBA code should be allowed (can be found in the security settings).
  3. On some systems unsolvable MS Word errors may occur resulting into an unfortunate Quaestor error. When this is the case, please select mode%=2 and open the document separately.
  4. In multi-case solutions, MS Word is not started per case, even if Mode%=1.
  5. Please note that WINWORD$ only works with RTF documents and not with .DOC, .TXT, etc.
  6. Target$ should not contain any path information, the output file is ALWAYS written to the current Report directory. If path information is included in Target$, it is removed. Preferably, do not use the name of your template as Target$.
  7. The WINWORD$ function returns the file name being the value of Target$. In the event of multi case document generation, "_" + CaseNr% is added automatically, e.g. DataFax_4.doc for the 4th case unless you have controled this multi case dependency yourself by adding "_"+ORCA(1) to your expression. 
  8. The simplest way to create a template file is by means of MS Word and save the document as rtf.
  9.  On any location where you want to insert values computed by Quaestor in the template, it should be indicated using format statements between "#". See the TEMPLATE$the TEMPLATE$() function for options. 

Qnowledge has provided a macro with the Quaestor distribution to assist with the creation of the RTF templates in MS Word. The file is by default installed in the "Qnowledge\Quaestor" directory and called "QnowledgeForm.dot".

To use this macro, place the file in the directory "startup" of Microsoft Office. Usually this is directory is in: "C:\Program Files\Microsoft Office\Office..\STARTUP". Please note that you might also need to change your Word macro security settings because the macro as no Thrust certificate.
After placing the file in the indicated directory an additional button  is provided. For further explanation on the macro please click here.

  1. To use document parts into a master document, you have to generate the document parts and add tags to these document parts using their file name as parameter (so including "#") in the master document (or any other sub-level). The sub-documents should exist before the master document is generated. This is done easiest by adding parameters for generating the document tags and for generating the sub-documents in the expression for generating the master document. Note that this functionality uses Word automation.
  2. Please note that, comparable to creating tables in Word with TELITAB2WORD$() function by means of a VBA macro based on a TeLiTab data set, you can execute any VBA macro inside the document on a specified place. The only thing you have to do is to refer in the document template to a parameter which contains a reference to the macro file (*.bas). A powerful aspect is the possibility to create the macro file itself as part of the process in the knowledge base. In this way, you are able to use very strong Word automation through standard VBA functionality and the TEMPLATE$the TEMPLATE$() function. However, please be aware that Quaestor will not have knowledge of the VBA macro's itself, the Knowlege Engineer will stay responsible for the proper operation of the macro's as part of the document generation. 
  3. Since version 2.49.2 you can also execute your macro's after document generation as part of the generation itself. Add @RUNWORDMACRO to the dataslot of the relation with the parameter name containing the reference to a macro file or reference to the macro file itselt.

...

For extensive information on document formatting options, please revert to the TEMPLATE$the TEMPLATE$() function.

Step 2)

Verify the template document by using the menu option "Tools>RTF Template Check" in Quaestor.

...

The template document can contain any graphical and/or markup information deemed necessary. As mentioned above, on any location where you want to insert values computed byQuaestor in the template, it should be indicated using format statements between "#". See the TEMPLATE$the TEMPLATE$() function for options.

In the example of a template:

...