We help IT Professionals succeed at work.

Auto Print Email Attachments as they arrive in my inbox, Outlook 2016

I have a group of outsourced workers that work for me from India.  We are wanting them to be able to send PDF documents directly to a printer in our office in the US, but.... do not want to have them connecting to our office via a VPN or anything like that.

With that being said, I am wondering if it is possible to have them email the PDF to an email address that uses Outlook 2016 and setup a script or something that would run every 30 seconds or so looking for all new emails and automatically printing any attachments, then marking the email as read and moving to another folder?

If so, can I get assistance with the code/script or any software that would do this?  In pretty bad need as this was just added to my plate and they want it ready by Monday.
Any assistance is appreciated.  Operating System is Windows 10 Pro, 64 Bit
Comment
Watch Question

Some printers are able to print emails directly if it is sent to the printer's email address. Check to see if your printer does, or post its model here.

If the printer cannot do it, the following VBA script should do the job. Enter it from the Developer tab. You'll then need to set a rule to run the script.

On Error GoTo OError’detect Temp
Dim oFS As FileSystemObject
Dim sTempFolder As String
Set oFS = New FileSystemObject
‘Temporary Folder Path
sTempFolder = oFS.GetSpecialFolder(TemporaryFolder)’creates a special temp folder
cTmpFld = sTempFolder & “\OETMP” & Format(Now, “yyyymmddhhmmss”)
MkDir (cTmpFld)’save & print
Dim oAtt As Attachment
For Each oAtt In Item.Attachments
FileName = oAtt.FileName
FullFile = cTmpFld & “\” & FileName’save attachment
oAtt.SaveAsFile (FullFile)’prints attachment
Set objShell = CreateObject(“Shell.Application”)
Set objFolder = objShell.NameSpace(0)
Set objFolderItem = objFolder.ParseName(FullFile)
objFolderItem.InvokeVerbEx (“print”)Next oAtt
‘Cleanup
If Not oFS Is Nothing Then Set oFS = Nothing
If Not objFolder Is Nothing Then Set objFolder = Nothing
If Not objFolderItem Is Nothing Then Set objFolderItem = Nothing
If Not objShell Is Nothing Then Set objShell = Nothing

OError:
If Err <> 0 Then
MsgBox Err.Number & ” – ” & Err.Description
Err.Clear
End If
Exit Sub

End Sub

Open in new window

For more details see this webpage. However, I have also read somewhere that Outlook no longer supports scripts.

Author

Commented:
Printer Model is:  HP LaserJet P2035n
As far as I can tell, that printer does not support email printing, even with the network card installed.

Author

Commented:
Is there a printer model you know of that will print to email like you are saying?  A brother or Dell?
I'll have a look later today. What kind of specs & price range?

Author

Commented:
Just need to have ability to scan to email (office 365) obviously need to be able to have this email address assigned to it so I have them in India send it directly to that printer in the US and have it print out.

$150-$400 preferably.
I doubt if there is a email-capable printer in that price range.

If the script I gave does not work, you can also try cloud printing via Google Cloud Print, Xerox Cloud or HP ePrint. Google gives you the widest selection. Unfortunately the P2035 is not on any of the lists. If you are buying a new printer from the list, make sure it will scan-to-email. Some printers will only email via an app on the PC.

Cloud compatible printers are here:
Google  https://www.google.com/cloudprint/learn/printers/
HP  https://support.hp.com/in-en/document/c03839843#AbT2
For Xerox try https://www.office.xerox.com/en-us/printers/feat-connectkey  but I do not think they have anything in your price range.

Author

Commented:
what printers are email capable if not in that price range?

Author

Commented:
Will this one work, with ePrint?

HP LaserJet Pro M203dw Wireless Laser Printer
Yes, it is listed on the ePrint support page I posted.

Author

Commented:
Thank you hdhondt, wonderful experience.  You were very helpful.
My pleasure.