Ga naar hoofdinhoud

Hoe beantwoord je alles met originele bijlagen in Outlook?

Normaal gesproken gaan de originele bijlagen automatisch verloren als u de functie Allen beantwoorden toepast om het bericht aan alle ontvangers in Outlook te beantwoorden. Is het mogelijk om originele bijlagen toe te voegen wanneer u iedereen beantwoordt in Outlook?

Beantwoord allemaal met originele bijlagen met VBA-code

Beantwoord alles met originele bijlagen met Kutools voor Outlook


Beantwoord allemaal met originele bijlagen met VBA-code

Er is geen directe functie om met deze taak om te gaan in Outlook, maar u kunt de volgende VBA-code toepassen om dit te bereiken. Voer de onderstaande stappen uit:

1. Start Outlook en houd vervolgens de ALT + F11 toetsen om de te openen Microsoft Visual Basic voor toepassingen venster.

2. In de Microsoft Visual Basic voor toepassingen venster, dubbelklik DezeOutlookSessie van het Project1 (VbaProject.OTM) deelvenster om de modus te openen en kopieer en plak vervolgens de volgende code in de lege module.

VBA-code: beantwoord allemaal met originele ahhachments:

Sub ReplyAllWithAttachments()
'Updateby Extendoffice
Dim xItem As Object
On Error Resume Next
Select Case TypeName(Outlook.Application.ActiveWindow)
Case "Explorer"
For Each xItem In Outlook.Application.ActiveExplorer.Selection
GetReplyItem xItem
Next
Case "Inspector"
Set xItem = Outlook.Application.ActiveInspector.CurrentItem
GetReplyItem xItem
End Select
Set xItem = Nothing
End Sub
Sub GetReplyItem(Item As Object)
Dim xReplyMailItem As Outlook.MailItem
On Error Resume Next
If Not Item Is Nothing Then
Set xReplyMailItem = Item.ReplyAll
GetAttachments Item, xReplyMailItem
xReplyMailItem.Display
'xReplyMailItem.Send
Item.UnRead = False
End If
Set xReplyMailItem = Nothing
End Sub
Sub GetAttachments(xSourceItem, xTargetItem)
Dim xFSO As Scripting.FileSystemObject
Dim xTmpPath As String
Dim xAttachment As Attachment
Dim xTmpFile As String
On Error Resume Next
Set xFSO = New Scripting.FileSystemObject
xTmpPath = CreateObject("shell.Application").NameSpace(5).self.Path & "\TmpAttachments\"
If xFSO.FolderExists(xTmpPath) = False Then
MkDir xTmpPath
End If
For Each xAttachment In xSourceItem.Attachments
If IsEmbeddedAttachment(xAttachment) = False Then
xTmpFile = xTmpPath & xAttachment.FileName
xAttachment.SaveAsFile xTmpFile
xTargetItem.Attachments.Add xTmpFile, , , xAttachment.DisplayName
xFSO.DeleteFile xTmpFile
End If
Next
If xFSO.FolderExists(xTmpPath) Then
Kill xTmpPath
End If
Set xFSO = Nothing
End Sub
Function IsEmbeddedAttachment(Attach As Attachment)
Dim xAttParent As Object
Dim xCID As String, xID As String
Dim xHTML As String
On Error Resume Next
Set xAttParent = Attach.Parent
xCID = ""
xCID = Attach.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x3712001F")
If xCID <> "" Then
xHTML = xAttParent.HTMLBody
xID = "cid:" & xCID
If InStr(xHTML, xID) > 0 Then
IsEmbeddedAttachment = True
Else
IsEmbeddedAttachment = False
End If
End If
End Function

doc antwoord alles met bijlage 1

3. En klik vervolgens op Tools > Referenties in de Microsoft Visual Basic voor toepassingen raam, in de pop uit Referenties-Project1 dialoogvenster, vink aan Microsoft Scripting-runtime optie van de Beschikbare referenties keuzelijst, zie screenshot:

doc antwoord alles met bijlage 9

4. Sla vervolgens het codevenster op en sluit het, en vervolgens kunt u de macroknop toevoegen aan het Snelle toegangswerkbalk.

5. Open de e-mail die u allemaal wilt beantwoorden, met bijlage erin Bericht venster en kies vervolgens Meer opdrachten van het Pas de werkbalk Snelle toegang aan dropdown, zie screenshot:

doc antwoord alles met bijlage 2

6. In de Outlook Opties dialoogvenster voert u de volgende bewerkingen uit:

(1.) Selecteer Macro's van het Kies opdrachten van keuzelijst;

(2.) Klik op de macronaam die u zojuist hebt ingevoegd;

(3.) En klik dan Toevoegen knop om de macro toe te voegen aan het Pas de werkbalk Snelle toegang aan.

doc antwoord alles met bijlage 3

7. Dan klikken OK om het dialoogvenster te sluiten, is nu de macroknop ingevoegd in het Snelle toegangswerkbalk, zie screenshot:

doc antwoord alles met bijlage 4

8. Klik nu op de macroknop en het antwoordberichtvenster met originele bijlagen wordt geopend, stel vervolgens het antwoordbericht op en klik op Verzenden knop, zie screenshot:

doc antwoord alles met bijlage 5


Beantwoord alles met originele bijlagen met Kutools voor Outlook

Als je Kutools for Outlook, Met Allen beantwoorden met bijlage Met deze functie kunt u iedereen met bijlagen met slechts één klik beantwoorden.

Kutools for Outlook : met meer dan 100 handige Outlook-invoegtoepassingen, gratis te proberen zonder beperking in 60 dagen. 

Na het installeren van Kutools for Outlook, doe dit als volgt:

1. Selecteer het bericht dat u allemaal met bijlagen wilt beantwoorden en klik vervolgens op Kutools > Reageer met bijlage > Allen beantwoorden met bijlage, zie screenshot:

2. En het antwoordberichtvenster wordt geopend met originele bijlagen, stel vervolgens uw bericht op en verzend het, zie screenshot:

doc antwoord alles met bijlage 7

Klik om Kutools voor Outlook en nu gratis uit te proberen!


Beste Office-productiviteitstools

Kutools for Outlook - Meer dan 100 krachtige functies om uw Outlook een boost te geven

🤖 AI Mail-assistent: Directe professionele e-mails met AI-magie: met één klik geniale antwoorden, perfecte toon, meertalige beheersing. Transformeer e-mailen moeiteloos! ...

???? Email Automation: Niet aanwezig (beschikbaar voor POP en IMAP)  /  Plan het verzenden van e-mails  /  Automatische CC/BCC volgens regels bij het verzenden van e-mail  /  Automatisch doorsturen (geavanceerde regels)   /  Begroeting automatisch toevoegen   /  Splits e-mails van meerdere ontvangers automatisch op in individuele berichten ...

📨 email management: Gemakkelijk e-mails herinneren  /  Blokkeer zwendel-e-mails van onderwerpen en anderen  /  Verwijder dubbele e-mails  /  Uitgebreid Zoeken  /  Consolideer mappen ...

📁 Bijlagen ProBatch opslaan  /  Batch losmaken  /  Batchcompressie  /  Automatisch opslaan   /  Automatisch loskoppelen  /  Automatisch comprimeren ...

???? Interface-magie: 😊Meer mooie en coole emoji's   /  Verhoog uw Outlook-productiviteit met weergaven met tabbladen  /  Minimaliseer Outlook in plaats van te sluiten ...

???? Wonderen met één klik: Beantwoord iedereen met inkomende bijlagen  /   Antiphishing-e-mails  /  🕘Toon de tijdzone van de afzender ...

👩🏼‍🤝‍👩🏻 Contacten en agenda: Batchcontacten toevoegen uit geselecteerde e-mails  /  Splits een contactgroep in individuele groepen  /  Verwijder verjaardagsherinneringen ...

Over 100 Eigenschappen Wacht op je verkenning! Klik hier om meer te ontdekken.

 

 

Comments (15)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Is it possible that, after a reboot or windows update, the macro is not working anymore? Also after doing again the procedure is not working anymore
This comment was minimized by the moderator on the site
Bonjour, la macro n'a fonctionné qu'une seule fois, dommage
This comment was minimized by the moderator on the site
Bonjour, nickel, mais n'a fonctionné qu'une fois. dommage
This comment was minimized by the moderator on the site
BonjourCette macros est super malheureusement cela ne fonctionne qu'une fois.. dommage
This comment was minimized by the moderator on the site
is there a macro that replies to all keeps attachments and keeps the original email in text format?
This comment was minimized by the moderator on the site
Thank you very much, you are the only one to share this macro and it's awesome, thank you for your work !
This comment was minimized by the moderator on the site
a macro VBA só funciona por um dia?
This comment was minimized by the moderator on the site
Bonjour,


Super, ça marche à merveille. J'ai visité plein de tuto et d'échange sur le sujet et aucune réponse satisfaisante avant celui-ci. Sachant que jusqu'à présent, je bricolais toujours entre "transférer" et remettre les destinataires ou "répondre à tous" et remettre la ou les pièces jointes. Encore merci.

Harivola
This comment was minimized by the moderator on the site
All files in mail adding as attachment such as image in my signiture.
How can i only attachment files
This comment was minimized by the moderator on the site
Hi,
If you need to exclude the images within the messages which are inserted into the attachments, please apply the below VBA code, hope it can help you!
Sub ReplyAllWithAttachments()
Dim xItem As Object
On Error Resume Next
Select Case TypeName(Outlook.Application.ActiveWindow)
Case "Explorer"
For Each xItem In Outlook.Application.ActiveExplorer.Selection
GetReplyItem xItem
Next
Case "Inspector"
Set xItem = Outlook.Application.ActiveInspector.CurrentItem
GetReplyItem xItem
End Select
Set xItem = Nothing
End Sub
Sub GetReplyItem(Item As Object)
Dim xReplyMailItem As Outlook.MailItem
On Error Resume Next
If Not Item Is Nothing Then
Set xReplyMailItem = Item.ReplyAll
GetAttachments Item, xReplyMailItem
xReplyMailItem.Display
'xReplyMailItem.Send
Item.UnRead = False
End If
Set xReplyMailItem = Nothing
End Sub
Sub GetAttachments(xSourceItem, xTargetItem)
Dim xFSO As Scripting.FileSystemObject
Dim xTmpPath As String
Dim xAttachment As Attachment
Dim xTmpFile As String
On Error Resume Next
Set xFSO = New Scripting.FileSystemObject
xTmpPath = CreateObject("shell.Application").NameSpace(5).self.Path & "\TmpAttachments\"
If xFSO.FolderExists(xTmpPath) = False Then
MkDir xTmpPath
End If
For Each xAttachment In xSourceItem.Attachments
If IsEmbeddedAttachment(xAttachment) = False Then
xTmpFile = xTmpPath & xAttachment.FileName
xAttachment.SaveAsFile xTmpFile
xTargetItem.Attachments.Add xTmpFile, , , xAttachment.DisplayName
xFSO.DeleteFile xTmpFile
End If
Next
If xFSO.FolderExists(xTmpPath) Then
Kill xTmpPath
End If
Set xFSO = Nothing
End Sub
Function IsEmbeddedAttachment(Attach As Attachment)
Dim xAttParent As Object
Dim xCID As String, xID As String
Dim xHTML As String
On Error Resume Next
Set xAttParent = Attach.Parent
xCID = ""
xCID = Attach.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x3712001F")
If xCID <> "" Then
xHTML = xAttParent.HTMLBody
xID = "cid:" & xCID
If InStr(xHTML, xID) > 0 Then
IsEmbeddedAttachment = True
Else
IsEmbeddedAttachment = False
End If
End If
End Function
This comment was minimized by the moderator on the site
I signed up just to say thank you! Skyyang.
This comment was minimized by the moderator on the site
Thanks alot
This comment was minimized by the moderator on the site
Getting compile error as : User-define type not defined at line no " Dim xFSO As Scripting.FileSystemObject" under "Sub GetAttachments(xSourceItem, xTargetItem)"
Kindly Advice on this error.
This comment was minimized by the moderator on the site
Hello, Sam,
Sorry, the article misses the step 3, I have updated this article, please try again. Hope it can help you!

Thank you for your reminder.
This comment was minimized by the moderator on the site
Thank you so much skyyang!!

Works like a charm.

Best Regards
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations