Ir para o conteúdo principal

Como imprimir todos os anexos em um / vários e-mails no Outlook?

Como você sabe, ele só imprimirá o conteúdo do e-mail, como cabeçalho e corpo, quando você clicar no Envie o > Impressão no Microsoft Outlook, mas não imprime os anexos. Aqui vamos mostrar como imprimir todos os anexos em um e-mail selecionado com facilidade no Microsoft Outlook.


Imprima todos os anexos em uma mensagem de e-mail, um por um

O Microsoft Outlook nos fornece Impressão rápida , que pode ajudá-lo a imprimir anexos em uma mensagem de e-mail, um por um.

1. Selecione a mensagem de e-mail cujos anexos você imprimirá mais tarde.

2. Clique em um anexo neste e-mail.

3. Clique no Impressão rápida botão no Opções grupo no Anexos aba.

Note o Ferramentas de Anexo não será ativado até que você clique nos anexos de e-mails.

4. Uma caixa de diálogo Abrindo anexo de e-mail é exibida e, por favor, clique no botão Abra botão.

Observe que esta etapa abrirá o anexo selecionado e imprimirá este anexo selecionado ao mesmo tempo.

Para imprimir outros anexos neste e-mail, repita a Etapa 2 à Etapa 4.

Salve / exporte rapidamente todos os anexos de vários e-mails no Outlook

Normalmente podemos salvar anexos de um e-mail ativando o Ferramentas de Anexo e aplicando o Salvar todos os anexos recurso no Outlook. Mas, e se você salvar anexos de vários e-mails ou de toda a pasta de e-mail do Outlook? Experimente o Kutools para Outlook Salve Todos (Anexos).


salvar anexos em vários e-mails kto9

Impressão em lote de todos os anexos em uma mensagem de e-mail

Se houver muitos anexos em uma mensagem de e-mail, será demorado imprimi-los um por um. E o método a seguir o guiará facilmente pela impressão em lote de todos os anexos em uma mensagem de e-mail selecionada.

1. Selecione a mensagem de e-mail cujos anexos você imprimirá mais tarde.

2. No Outlook 2010 ou versões posteriores, clique no Envie o > Impressão > Opções de impressão. Veja a seguinte captura de tela:

3. Na caixa de diálogo Imprimir, verifique o Imprima arquivos anexados. Os anexos serão impressos apenas na impressora padrão opção no Opções de impressão seção.

4. Clique no Impressão botão.

5. Na caixa de diálogo de abertura de anexo de e-mail, clique no botão Abra botão para ir em frente. (Note: Esta caixa de diálogo aparecerá para cada anexo separadamente.)

Agora todos os anexos nesta mensagem de e-mail selecionada serão impressos de uma só vez.


Imprima em lote todos os anexos e imagens em vários e-mails selecionados

Para imprimir todos os anexos em vários emails, bem como todas as imagens no corpo da mensagem no Outlook, siga as etapas abaixo para aplicar um código VBA.

1. Na lista de discussão, por favor, segure Ctrl or Shift para selecionar vários e-mails cujos anexos você imprimirá.

2. pressione outro + F11 juntas para abrir a janela Microsoft Visual Basic for Applications.

3. Na janela Microsoft Visual Basic for Applications, clique em Ferramentas > Referências. E então verifique o Tempo de execução de scripts da Microsoft opção como mostrado abaixo. Assim que terminar, clique OK.

4. Clique inserção > Móduloe cole o código VBA abaixo na janela do novo módulo.

VBA: imprimir todos os anexos em vários e-mails do Outlook

Sub PrintAllAttachmentsInMultipleMails()
  'Update by ExtendOffice 2022/08/03
  Dim xShellApp As Object
  Dim xFSO As Scripting.FileSystemObject
  Dim xItem As Object
  Dim xTempFldPath, xFilePath As String
  Dim xSelItems As Outlook.Selection
  Dim xMailItem As Outlook.MailItem
  Dim xAttachments As Outlook.Attachments
  Dim xAttachment As Outlook.Attachment
  Dim xFile As File
  On Error Resume Next
  Set xFSO = New Scripting.FileSystemObject
  xTempFldPath = xFSO.GetSpecialFolder(2).Path & "\Attachments " & Format(Now, "yyyymmddhhmmss") 'xFSO.GetSpecialFolder(2) For saving temporary files
  If xFSO.FolderExists(xTemfldpath) = False Then 'create temporary folder
    xFSO.CreateFolder (xTempFldPath)
  End If
  Set xSelItems = Outlook.ActiveExplorer.Selection
  Set xShellApp = CreateObject("Shell.Application")
  For Each xItem In xSelItems
    If xItem.Class = OlObjectClass.olMail Then
      Set xMailItem = xItem
      Set xAttachments = xMailItem.Attachments
      For Each xAttachment In xAttachments
        xFilePath = xTempFldPath & "\" & xAttachment.FileName
        xAttachment.SaveAsFile (xFilePath)
      Next
    End If
  Next
  For Each xFile In xFSO.GetFolder(xTempFldPath).Files
    VBA.DoEvents
    Call xShellApp.ShellExecute(xFile.Path, "", "", "print", 0)
  Next
  Set xSelItems = Nothing
  Set xShellApp = Nothing
  Set xFSO = Nothing
End Sub

5. Pressione F5 ou clique no Execute botão para executar este código VBA. Agora você verá que todos os anexos nos e-mails selecionados e as imagens no corpo da mensagem são impressos.

Observação:

  • Cada imagem exibirá uma caixa de diálogo pop-up para solicitar a confirmação da impressão. Enquanto outros tipos de arquivos serão impressos diretamente.
  • Se houver imagens em uma assinatura de e-mail, elas também exibirão caixas de diálogo pop-up.
  • Se você pegar As macros neste projeto estão desabilitadas erro, por favor verifique este tutorial: Como habilitar e desabilitar macros no Outlook?

Imprima em lote todos os anexos em vários e-mails selecionados, exceto imagens no corpo

Para imprimir apenas anexos em vários emails, mas as imagens no corpo da mensagem no Outlook, siga as etapas abaixo para aplicar um código VBA.

1. Na lista de discussão, por favor, segure Ctrl or Shift para selecionar vários e-mails cujos anexos você imprimirá.

2. pressione outro + F11 juntas para abrir a janela Microsoft Visual Basic for Applications.

3. Na janela Microsoft Visual Basic for Applications, clique em Ferramentas > Referências. E então verifique o Tempo de execução de scripts da Microsoft opção como mostrado abaixo. Assim que terminar, clique OK.

4. Clique inserção > Móduloe cole o código VBA abaixo na janela do novo módulo.

VBA: imprimir todos os anexos em vários e-mails do Outlook

Sub PrintAllAttachmentsInMultipleMails()
  'Update by ExtendOffice 2022/08/05
  Dim xShellApp As Object
  Dim xFSO As Scripting.FileSystemObject
  Dim xItem As Object
  Dim xTempFldPath, xFilePath As String
  Dim xSelItems As Outlook.Selection
  Dim xMailItem As Outlook.MailItem
  Dim xAttachments As Outlook.Attachments
  Dim xAttachment As Outlook.Attachment
  Dim xFile As File
  On Error Resume Next
  Set xFSO = New Scripting.FileSystemObject
  xTempFldPath = xFSO.GetSpecialFolder(2).Path & "\Attachments " & Format(Now, "yyyymmddhhmmss") 'xFSO.GetSpecialFolder(2) For saving temporary files
  If xFSO.FolderExists(xTemfldpath) = False Then 'create temporary folder
    xFSO.CreateFolder (xTempFldPath)
  End If
  Set xSelItems = Outlook.ActiveExplorer.Selection
  Set xShellApp = CreateObject("Shell.Application")
  For Each xItem In xSelItems
    If xItem.Class = OlObjectClass.olMail Then
      Set xMailItem = xItem
      Set xAttachments = xMailItem.Attachments
      For Each xAttachment In xAttachments
        If IsEmbeddedAttachment(xAttachment) = False Then
          xFilePath = xTempFldPath & "\" & xAttachment.FileName
          xAttachment.SaveAsFile (xFilePath)
          Debug.Print xFilePath
        End If
      Next
    End If
  Next
  For Each xFile In xFSO.GetFolder(xTempFldPath).Files
    VBA.DoEvents
    Call xShellApp.ShellExecute(xFile.Path, "", "", "print", 0)
  Next
  Set xSelItems = Nothing
  Set xShellApp = Nothing
  Set xFSO = Nothing
End Sub

Function IsEmbeddedAttachment(Attach As Attachment)
Dim xItem As MailItem
Dim xCid As String
Dim xID As String
Dim xHtml As String
On Error Resume Next
IsEmbeddedAttachment = False
Set xItem = Attach.Parent
If xItem.BodyFormat <> olFormatHTML Then Exit Function
xCid = ""
xCid = Attach.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x3712001F")
If xCid <> "" Then
    xHtml = xItem.HTMLBody
    xID = "cid:" & xCid
    If InStr(xHtml, xID) > 0 Then
        IsEmbeddedAttachment = True
    End If
End If
End Function

5. Pressione F5 ou clique no Execute botão para executar este código VBA. Agora você verá que todos os anexos nos e-mails selecionados são impressos.

Observação:

  • Cada imagem anexada abrirá uma caixa de diálogo pop-up para solicitar a confirmação da impressão. Enquanto outros tipos de arquivos serão impressos diretamente.
  • As imagens no corpo da mensagem não serão impressas.
  • Se você pegar As macros neste projeto estão desabilitadas erro, por favor verifique este tutorial: Como habilitar e desabilitar macros no Outlook?

 


Demonstração: imprima um ou todos os anexos em um e-mail do Outlook


Dica: Neste vídeo, Kutools guia é adicionada por Kutools for Outlook. Se você precisar, por favor clique SUA PARTICIPAÇÃO FAZ A DIFERENÇA para ter um teste gratuito de 60 dias sem limitação!


Melhores ferramentas de produtividade de escritório

Kutools for Outlook - Mais de 100 recursos poderosos para turbinar seu Outlook

🤖 Assistente de correio AI: E-mails profissionais instantâneos com magia de IA – um clique para respostas geniais, tom perfeito, domínio multilíngue. Transforme o envio de e-mails sem esforço! ...

📧 Automação de e-mail: Fora do escritório (disponível para POP e IMAP)  /  Agendar envio de e-mails  /  CC/BCC automático por regras ao enviar e-mail  /  Encaminhamento automático (regras avançadas)   /  Adicionar saudação automaticamente   /  Divida automaticamente e-mails de vários destinatários em mensagens individuais ...

📨 Gestão de E-mail: Lembre-se facilmente de e-mails  /  Bloquear e-mails fraudulentos por assuntos e outros  /  Apagar Emails Duplicados  /  Pesquisa Avançada  /  Consolidar pastas ...

📁 Anexos PróSalvar em lote  /  Desanexar lote  /  Comprimir em Lote  /  Salvamento automático   /  Desanexação Automática  /  Compressão automática ...

???? Interface Mágica: 😊Mais emojis bonitos e legais   /  Aumente a produtividade do seu Outlook com visualizações com guias  /  Minimize o Outlook em vez de fechar ...

???? Maravilhas com um clique: Responder a todos com anexos recebidos  /   E-mails antiphishing  /  🕘Mostrar fuso horário do remetente ...

👩🏼‍🤝‍👩🏻 Contatos e calendário: Adicionar contatos em lote de e-mails selecionados  /  Dividir um grupo de contatos em grupos individuais  /  Remover lembretes de aniversário ...

Sobre Características 100 Aguarde sua exploração! Clique aqui para descobrir mais.

 

 

Comments (24)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Is it possible to specify a network printer instead of always printing with the standard printer?
This comment was minimized by the moderator on the site
Dear all,

I had tried the VBA and the code runs but many popups are opening on screen to print images from the mail signature (apparently this is considered an attachment). Anyone knows how to solve it?

S.
This comment was minimized by the moderator on the site
If you don't want to print pictures in the body of a message, please use the code below:
Sub PrintAllAttachmentsInMultipleMails()
  'Update by ExtendOffice 2022/08/05
  Dim xShellApp As Object
  Dim xFSO As Scripting.FileSystemObject
  Dim xItem As Object
  Dim xTempFldPath, xFilePath As String
  Dim xSelItems As Outlook.Selection
  Dim xMailItem As Outlook.MailItem
  Dim xAttachments As Outlook.Attachments
  Dim xAttachment As Outlook.Attachment
  Dim xFile As File
  On Error Resume Next
  Set xFSO = New Scripting.FileSystemObject
  xTempFldPath = xFSO.GetSpecialFolder(2).Path & "\Attachments " & Format(Now, "yyyymmddhhmmss") 'xFSO.GetSpecialFolder(2) For saving temporary files
  If xFSO.FolderExists(xTemfldpath) = False Then 'create temporary folder
    xFSO.CreateFolder (xTempFldPath)
  End If
  Set xSelItems = Outlook.ActiveExplorer.Selection
  Set xShellApp = CreateObject("Shell.Application")
  For Each xItem In xSelItems
    If xItem.Class = OlObjectClass.olMail Then
      Set xMailItem = xItem
      Set xAttachments = xMailItem.Attachments
      For Each xAttachment In xAttachments
        If IsEmbeddedAttachment(xAttachment) = False Then
          xFilePath = xTempFldPath & "\" & xAttachment.FileName
          xAttachment.SaveAsFile (xFilePath)
          Debug.Print xFilePath
        End If
      Next
    End If
  Next
  For Each xFile In xFSO.GetFolder(xTempFldPath).Files
    VBA.DoEvents
    Call xShellApp.ShellExecute(xFile.Path, "", "", "print", 0)
  Next
  Set xSelItems = Nothing
  Set xShellApp = Nothing
  Set xFSO = Nothing
End Sub

Function IsEmbeddedAttachment(Attach As Attachment)
Dim xItem As MailItem
Dim xCid As String
Dim xID As String
Dim xHtml As String
On Error Resume Next
IsEmbeddedAttachment = False
Set xItem = Attach.Parent
If xItem.BodyFormat <> olFormatHTML Then Exit Function
xCid = ""
xCid = Attach.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x3712001F")
If xCid <> "" Then
    xHtml = xItem.HTMLBody
    xID = "cid:" & xCid
    If InStr(xHtml, xID) > 0 Then
        IsEmbeddedAttachment = True
    End If
End If
End Function
This comment was minimized by the moderator on the site
Dear Amanda,

Thank you for the code. It worked!

S.
This comment was minimized by the moderator on the site
Hi there,

Sorry that printing images will bring up popups. You will have to confirm each to download all the images. If you don't need to print images, please click Cancel.

Amanda
This comment was minimized by the moderator on the site
I am using Microsoft 365 and this worked after deleting line 9. Thanks! This has saved a bit of time for me.
Rated 5 out of 5
This comment was minimized by the moderator on the site
hallo, ich möchte nur den Anhang der Mails von der angegebenen Adresse senden, wie kann ich das machen, danke
This comment was minimized by the moderator on the site
Vielen, vielen Dank dafür! Hat uns enorm viel Arbeit erspart.Auch ich musste - wie bereits in den Kommentaren geschrieben - die neunte Zeile "Dim xAttachment As Outlook.Attachment On Error Resume Next" entfernen, dann lief der Code einfandfrei durch.
This comment was minimized by the moderator on the site
Hi, this worked fine for me yesterday but now it is saying 'the macros in this project are disabled' Any advice how to enable them? 
This comment was minimized by the moderator on the site
This comment was minimized by the moderator on the site
on line 9 , removing "On Error Resume Next" worked for me.
This comment was minimized by the moderator on the site
Hi everyone, we updated the VBA code in the tutorial on 2022/08/03. If you still need to print all attachments, please check the new code. 😊
This comment was minimized by the moderator on the site
Hi, I have been using this shortcut for a few weeks now, printing all attachments from multiple emails at once, and I have recently been having to remove line 9 as Nilanka said, which has been working, but this no longer works. Im getting the warning box saying the macros in this project are disabled.....and so on... if someone has a solution to make this work as it has been prior to now, please lmk, as i am selecting about 60 emails all containing attachments to print. Thanks
This comment was minimized by the moderator on the site
This comment was minimized by the moderator on the site
Thank you 
This comment was minimized by the moderator on the site
yes this just worked for me as well. Thank you!
This comment was minimized by the moderator on the site
the VBA code gives syntax is error
This comment was minimized by the moderator on the site
if a pdf has the same name the macro prints just one pdf, how can i change the code in order to modify the pdf name?
This comment was minimized by the moderator on the site
if you want to print all attachments together in 1 email here's what you do. first make a folder on your desktop....I named mine "print". go to the email with the attachments....highlight all of the attachments, right click, save all attachments to the print folder. Open the print folder.....highlight all of them.....right click.....print.



now if only I could figure out how to print all the attachments in 200 emails without opening each one and printing it.
This comment was minimized by the moderator on the site
Kutools for Outlook's Detach All (Attachments) feature can help you download all attachments from multiple emails with several clicks! https://www.extendoffice.com/product/kutools-for-outlook/outlook-detach-attachments.html
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations