Easiest way to print documents

Hello

I am looking for the easiest way to print a document
I would prefer to avoid nonfficial packages/components and printing through click

The easiest and quickest way when I do it manually is via cmd
However i don’t see any activity to use cmd directly

The invoke powershell activity opens the windows explorer which i do not want

do you have any suggestions

it’s a word document

thanks

Hi @adext

You can use Start Process Activity

Give the Word executable Path and in argument field add

“/p full_file_path”

Cheers

Hi @rikulsilva , how do i specify the printer server and name ?

Hey @adext
here you can find solution to printing word document on default printer:
BlankProcess96.zip (2.4 KB)

I used VBScript and start process activity.
image

Set wordApp = CreateObject("Word.Application")
wordApp.Documents.Open "C:\path\to\your\document.docx"
wordApp.ActiveDocument.PrintOut
wordApp.ActiveDocument.Close
wordApp.Quit
1 Like

hello @pikorpa
thanks!
what about pdf ? does this work for it as well or is there an easier way?

Printing PDF files can be a bit different from handling Word documents,because PDF files are usually opened with a PDF reader (like Adobe Reader)

You can try use PowerShell:
Start-Process -FilePath "path\to\your\file.pdf" -Verb Print -Wait

Hi @adext

If you want to print whatever file type

you can use this in argument field

"/c echo off & print \\servername\printname full_file_path"

@rikulsilva it doesn’t work it just opens the word app

In the process field to start, add full path of cmd instead word application. I forgotten to mention

hi @rikulsilva it doesnt open the file anymore but doesn’t send anything to printer :frowning: