I've found the following Outlook VBA script which batch prints all the email attachments in a sub-folder:
Public Sub PrintAttachments()
Dim Inbox As MAPIFolder
Dim Item As MailItem
Dim Atmt As Attachment
Dim FileName As String
Dim i As Integer
Set Inbox = GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Parent.Folders.Item("Batch Prints")
For Each Item In Inbox.Items
For Each Atmt In Item.Attachments
' all attachments are first saved in the temp folder C:\Temp. Be sure to create this folder.
FileName = "C:\Temp\" & Atmt.FileName
Atmt.SaveAsFile FileName
' please change the program folder accordingly if the Acrobat Reader is not installed on drive C:
Shell """C:\Program Files\Adobe\Reader 8.0\Reader\acrord32.exe"" /h /p """ + FileName + """", vbHide
Next
Item.Delete 'remove this line if you don't want the email to be deleted automatically
Next
Set Inbox = Nothing
End Sub
Source: http://www.howtogeek.com/howto/microsoft-office/batch-print-pdf-attachments-in-outlook/
My question is: Is it possible to convert this script to 64 bit as installing 32 bit Office is not an option.
I found PtrSafe but that only seems to be relevant when it comes to .dll declarations.
Office version: 2016 64 bit