Improved Export of MS Word Documents

  Libor Buš tips share

Learn how to export Word HTML reports with requirement IDs embedded in the requirements text description paragraph instead of placing IDs in a separate column.

The common practice of capturing requirements in MS Word is to store requirement IDs at the start of the corresponding requirement description paragraph, for instance:

[SRS-123] The exported document in MS Word shall have the text description of all requirements prefixed by requirement ID.

From this reason, we have modified both predefined export templates of MS Word HTML — MS Word (Table) and MS Word (Book), to output requirement IDs as the corresponding requirements text description prefix instead of placing IDs in a separate column:

Export of Word HTML  with ID Prefix in requirement text description

You can apply this formatting also in your custom HTML export templates. You can use formatPrefixedXHTML template helper (new in v2.2.4) which adds a custom prefix given by the child block to a given XHTML value. You can optionally provide a paragraph class name for <p> or <div> tags in paragraphClass parameter and a character class name in charClass parameter.

Example

The following HTML template snippet formats value of requirement text attribute (requirement text description) prefixed by the value of id attribute (unique identifier):

{{#formatPrefixedXHTML text paragraphClass="text"}}
{{#unless heading}}<span class="id">[{{docObjId}}]</span> {{/unless}}
{{/formatPrefixedXHTML}}

The id prefix is not added for section objects with heading attribute because these objects are displayed with section numbers. Exported requirement description paragraphs are marked by paragraph class text for which you can customize paragraph style in your MS Word template in which you insert the MS Word HTML file exported from ReqView, see MS Word HTML. For instance, you can increase its top and bottom paragraph margins as demonstrated on the above screenshot.

References

For more information about HTML export check following documentations sections: