company logo

Create MS Office document

The action creates an MS Office document based on an MS Office document template. Document templates are searched in the folder set inOptions.Documentation.Templates. Depending on the object type for which the document is to be created, different document templates have to be provided.

  • TopicsDocu.dot - Terminus themes topic documentation (HierarchyTopic)
  • TerminologyModel.dot - Terminology model documentation for projects (ODC_Project), modules (ODC_Module), classes (ODC_ImpClass), complex data types (SDB_Structure) and enumerations.
  • ReferenceDocu.dot - Reference documentation for projects (ODC_Project), modules (ODC_Module), classes (ODC_ImpClass), complex data types (SDB_Structure) and enumerations (SDB_ValueList)
  • The first two documentations claim to be conceptual documentations. The others are technical ones. Usually, templates are installed with ODABA and provided in the tpl folder in the ODABA installation directory. When templates are not available there, they might be downloaded from

    www.odaba.com/content/downloads/demos/odabaDefaultTemplates.zip

MS Office document templates are based on MS Basic Script macros. In order to access the database from within MS document templates, a wrapper DLL has to be provided, since MS Basic uses reserved names which are used differently in ODABA. A simple example for a .NET wrapper library is available at

www.odaba.com/content/downloads/demos/odabaWordHelper.zip

Before calling document generating actions check that the templates are provided in the folder referenced in Templates option. Documents work for the classes mentioned above. The instance to be documented has to be referenced as option ItemName in the document template, which will be set properly by the function calling the template (pc_base::CreateDocument_doc()).

MS Office document generation always starts a separate process. When calling MS Office document generating actions, the action tries to open the document template via extension, i.e. the dot extension has to be associated with MS Office Word. Information for generating the document is passed in an ini-file, which is written to the document template directory (see pp_base::CreateDocument_doc()). This ini-file is referenced in the document template, i.e. MS Office document templates should be updated before being used.

The folder for generated document files has to be passed in option Options.Documentation.DocumentTarget. Template name and document name (topic name) have to be passed to the standard implementation.

Notes:

MS Office document templates are not as generic as LibreOffice templates and need some special treatment. Moreover, the default templates passed do not support image export properly, i.e. generated documents require final revision after being generated.