Sign in to follow this  
Followers 0
Christ

auto print the attachment in meeting requests in outtlook

3 posts in this topic

Hi,

My manager always send me meeting requests with quite a few materials in the attachments. And I need to print them to prepare. So I need to save them then print one by one. I'm thinking if outlook can be setted to auto print the attachment in incoming meeting requests  for me . If it can, it will be so great. Any ideas?

Share this post


Link to post
Share on other sites

This will enable you to print the main email and it will force it to print the attachments as well: https://support.office.com/en-us/article/Print-attachments-received-in-email-messages-30fb682d-d311-4a17-ba5e-8409ca6f776e

 

This may work better but will involve some scripting: http://portal.infiniwiz.com/knowledgebase/37/Setup-Outlook-to-print-attachments-of-incoming-emails-automatically.html

Share this post


Link to post
Share on other sites

hello,Christ

You can write VBA code to do that for you. Here is a macro which may be  close to what you want.

Public WithEvents objItems As Outlook.Items

Private Sub Application_Startup()
    Set objItems = Outlook.Application.Session.GetDefaultFolder(olFolderInbox).Items
End Sub

Private Sub objItems_ItemAdd(ByVal Item As Object)
    Dim objTaskRequest As Outlook.TaskRequestItem
    Dim objTask As Outlook.TaskItem
    Dim objAttachments As Outlook.attachments
    Dim objAttachment As Outlook.Attachment
    Dim strMsg As String
    Dim nResponse As Integer
    Dim objFileSystem As Object
    Dim strTempFolder As String
    Dim objShell As Object
    Dim objTempFolder As Object
    Dim objTempFolderItem As Object
    Dim strFilePath As String
 
    On Error Resume Next
    If TypeOf Item Is TaskRequestItem Then
       Set objTaskRequest = Item
       Set objTask = objTaskRequest.GetAssociatedTask(True)
       Set objAttachments = objTask.attachments
    End If
 
    If objAttachments.Count > 0 Then
       strMsg = "Do you want to print the attachments in the new task request?"
       nResponse = MsgBox(strMsg, vbExclamation + vbYesNo, "New Task Request")
       If nResponse = vbYes Then
          Set objFileSystem = CreateObject("Scripting.FileSystemObject")
          strTempFolder = objFileSystem.GetSpecialFolder(2).Path & "\TEMP" & Format(Now, "hh-ss-dd-mm-yyyy")
          'Create a new temp folder
          MkDir (strTempFolder)
 
          For Each objAttachment In objAttachments
              'Save all the attachments to the newly created folder
              strFilePath = strTempFolder & "\" & objAttachment.FileName
              objAttachment.SaveAsFile (strFilePath)
 
              'Print all the items in the newly create folder
              Set objShell = CreateObject("Shell.Application")
              Set objTempFolder = objShell.NameSpace(0)
              Set objTempFolderItem = objTempFolder.ParseName(strFilePath)
              objTempFolderItem.InvokeVerbEx ("print")
          Next objAttachment
       End If
    End If
End Sub

Using this macro, every time any new task request arrive in your inbox, you will get a message asking if to print the task attachments. 

 

You can see more details here

 

https://www.datanumen.com/blogs/auto-print-attachments-incoming-task-requests-via-outlook-vba/

 

Good luck

 

Edited by Yaeshaw

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0