Document Generator

Document Generator is a premium action, optional tool. To work, it requires Lightning Forms or Lightning List Actions. Document Generator allows Microsoft Word documents to be generated from the content within a SharePoint list item. Word Documents can then be shared, Printed, Saved as PDF, or stored within a Document Library.

Core Features

T

he Document Generator is a Premium Custom Action that can integrate with Lightning Forms and Lightning List Actions. The Document Generator Action enables you to generate a Microsoft Word document that maps to fields within SharePoint List Items. An example would be of using a SharePoint list form to create a Purchase Order. The Purchase Order information can then be taken from the list to create the Word document in a Purchase Order layout suitable for sharing with a supplier.

Turn SharePoint List Items into Word Documents

When combined with custom form layouts, SharePoint list items often collect information for business forms such as Employee Expenses, Purchase Order, Invoice, Equipment Request, and many more. While it is useful to keep the content as a SharePoint List item, occasionally we may need to share the information in the form of a branded document.

Bulk Generate Multiple Word Documents with List Actions

Using Lightning List Actions together with Document Generator, SharePoint List Command Bar buttons can be created that will generate documents against multiple selected list items. The Documents can either be opened with a dynamically created filename, or stored within a named Document Library. Combined other actions such as Send Email, or Update List item can be used to log the fact that a document was generated.

Create Single Form Word Documents with Lightning Forms Actions

Standard SharePoint List Forms have a Save or Cancel button. Using Lightning Forms, additional command bar actions can be created to perform email notifications, generate other list items, modify field values and much more. This helps you to create alternatives to the Save or Cancel by using buttons such as ‘Submit Expenses’. The Document Generator can be used within Lightning Forms custom actions to generate a document from within the current SharePoint list form.

Watch a Quick Overview Of the Document Generator

Within this video, we explore the Premium Document Generator action for use within SharePoint Online Modern Lists via Lightning Forms or Lightning List Actions. The Document Generator Action allows us to build an Action Button to generate a Microsoft Word document that references the fields from the current SharePoint list item, or list items using a query.

Building the Microsoft Word Document

Any Microsoft Word Document can be used by the Document Generator Premium Action. In order to reference the fields within the SharePoint List Item, double squared brackets are used to reference a SharePoint column name. Loops can also be used to loop through each item within a sublist on a SharePoint form. In this example, we generate an Expense Report Document and loop through each expense item on the expense report.

Building the Custom Action within Lightning Forms

Using the Action Builder, the Document Generator Action is used to upload the Document Template, and reference the SharePoint list item using the [[ID]] column, and setting a file name pattern.

Using Lightning List Actions

using Lightning List Actions, the Document Generator can be used within the List command bar allowing documents to be generated from one or more selected SharePoint list items.

Item added to cart View Cart Checkout