Skip to main content

Printing Microsoft Word documents - Knowledgebase / Lasernet / Lasernet Developer FAQs - Formpipe Support Portal

Printing Microsoft Word documents

Authors list

This article provides a solution for how to automatically print Microsoft Word documents stored in JobData or as attachments to JobData.

Word documents stored in JobData

A Word document stored in JobData can be sent to the Print Output module as raw data. The Word file can (as an example) be received by a File Input Module or retrieved via a Web Service, File Retriever or Database Module.

A list of JobInfos must be defined for the Print Output Module to enable printing of Word documents stored in JobData.


JobInfo

Description Example
JobData Binary Word Data [Binary]
PrintMimetype Mimetype for Word file application/MSWord


Word document as an attachment

Word documents can also be stored as attachments to JobData.

Retrieve one or several Word documents via file access in JavaScript, the Database Module or File Retriever Module (file, FTP or HTTP) and insert them as print attachments.

A list of JobInfos must be defined for the Print Output Module to enable printing of Word documents attached to JobData:


JobInfo

Description Example
PrintAttachment[index] Binary Word Data [Binary]
PrintAttachmentMimetype[index] Mimetype for Word file application/MSWord


Additional information

From Windows 7 and Windows Server 2008, the following folders must exist to enable auto-printing of Word documents:

  • C:\Windows\System32\config\systemprofile\Desktop
  • C:\Windows\SysWOW64\config\systemprofile\Desktop (x64 OS only)

If the Desktop folders do not exist, you will receive the following error message in the Lasernet log and MS Word will not be able to print the document:

Could not print msword attachment: Unsupported variant type! [DispatchCaller::from_variant<IDispatch>]

Please ensure you have the necessary user rights in Windows to add the Desktop folders.

Modules required


Printer Output

The solution requires Microsoft Word 2010 or newer to be installed on the same computer as Lasernet for successfully printing Word documents.

We recommend turning off any functionality in MS Word that can cause MS Word to pop with a dialog that will require user interaction.

The solution has only been verified with Microsoft Word 2010 and 2013 (64-bit) on the following operating systems:

  • Windows 7 and 8.1 (64 bit)
  • Windows 2008 Server (64 bit)

Printer Profiles are not supported in Lasernet when printing Word documents via an external application like Microsoft Word.

Ensure that the Lasernet Service has the required user rights, to allow Microsoft Word to print to the selected Windows print queue, defined in the Printer Output settings.


Using Microsoft Word for printing Word documents in the background, by the Lasernet service, is an undocumented feature. Formpipe Software is not responsible for a possible future version of the OS or Microsoft Word causing the functionality to stop working.


Helpful Unhelpful

0 of 1 people found this page helpful

Add a comment

Please log in or register to submit a comment.

Need a password reminder?

Share