This project is not covered by Drupal’s security advisory policy.

This module provides a Word encoder for the Drupal Serialization API. This
enables the DOCX format to be used for data output (and potentially input,
eventually).

For example:

  • Views can output DOCX data via a 'Word Export' display in a View.
  • Leverages phpword Templates processing. You can upload an OOXML document template with included search-patterns (macros) which can be replaced by any value you wish. Only single-line values can be replaced. The search-pattern model is: ${search-pattern}, for example: ${your-field-name}
  • Module developers can leverage DOCX as a format when using the
    Serialization API.

Installation

The preferred installation method is to
[use Composer](https://www.drupal.org/docs/develop/using-composer/manage-dependencies).
* Enable the `doc_serialization` module. The serialization module should automatically be enabled too.

Creating a view with a DOC display

1. Create a new view
2. Add a *Word Export* display.
3. Select 'docx' for the accepted request formats under
`Format -> Word export -> Settings`.
4. Add a path, and optionally, a filename (pattern).
5. Upload the template file with search patterns same as views field names.
6. Add desired fields to the view.
7. The view will produce the new doc file with macros replaced by field values.

Supporting organizations: 
Sponsored development of this module

Project information

Releases