Loncat ke daftar isi utama

Bagaimana cara membalas semua dengan lampiran asli di Outlook?

Biasanya, saat Anda menerapkan fungsi Balas Semua untuk membalas pesan ke semua penerima di Outlook, lampiran asli akan hilang secara otomatis. Apakah mungkin untuk melampirkan lampiran asli saat membalas ke semua di Outlook?

Balas semua dengan lampiran asli dengan kode VBA

Balas semua dengan lampiran asli dengan Kutools for Outlook


Balas semua dengan lampiran asli dengan kode VBA

Tidak ada fitur langsung untuk menangani tugas ini di Outlook, tetapi, Anda dapat menerapkan kode VBA berikut untuk mencapainya. Silakan lakukan dengan langkah-langkah di bawah ini:

1. Luncurkan Outlook, lalu tahan file ALT + F11 kunci untuk membuka Microsoft Visual Basic untuk Aplikasi jendela.

2. di Microsoft Visual Basic untuk Aplikasi jendela, klik dua kali Sesi Pandangan ini dari Project1 (VbaProject.OTM) panel untuk membuka mode, lalu salin dan tempel kode berikut ke dalam modul kosong.

Kode VBA: Balas semua dengan ahhachments asli:

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

dok balas semua dengan lampiran 1

3. Dan kemudian klik Tools > Referensi dalam Microsoft Visual Basic untuk Aplikasi jendela, di muncul keluar Referensi-Proyek 1 kotak dialog, periksa Runtime Microsoft Scripting pilihan dari Referensi yang Tersedia kotak daftar, lihat tangkapan layar:

dok balas semua dengan lampiran 9

4. Kemudian simpan dan tutup jendela kode, lalu Anda dapat menambahkan tombol makro ke dalamnya Quick Access Toolbar.

5. Buka email yang ingin Anda balas semua dengan lampiran di dalamnya Sambutan dari Manajer Umum PT. LUHAI INDUSTRIAL jendela, lalu pilih Lebih Banyak Perintah dari Sesuaikan Bilah Alat Akses Cepat drop down, lihat tangkapan layar:

dok balas semua dengan lampiran 2

6. di Pilihan Outlook kotak dialog, lakukan operasi berikut:

(1.) Pilih Macro dari Pilih perintah dari daftar drop-down;

(2.) Klik nama makro yang baru saja Anda sisipkan;

(3.) Lalu klik Add tombol untuk menambahkan makro ke dalam Sesuaikan Bilah Alat Akses Cepat.

dok balas semua dengan lampiran 3

7. Lalu klik OK untuk menutup kotak dialog, sekarang tombol makro telah dimasukkan ke dalam Quick Access Toolbar, lihat tangkapan layar:

dok balas semua dengan lampiran 4

8. Sekarang, klik tombol makro, dan jendela pesan balasan dengan lampiran asli terbuka, lalu buat pesan balasan, dan klik Kirim tombol, lihat tangkapan layar:

dok balas semua dengan lampiran 5


Balas semua dengan lampiran asli dengan Kutools for Outlook

Jika Anda memiliki Kutools untuk Outlook, Dengan yang Balas Semua dengan Lampiran fitur, Anda dapat membalas semua dengan lampiran hanya dengan satu klik.

Kutools untuk Outlook : dengan lebih dari 100 add-in Outlook praktis, gratis untuk dicoba tanpa batasan dalam 60 hari. 

Setelah menginstal Kutools untuk Outlook, lakukan seperti ini:

1. Pilih pesan yang ingin Anda balas semua dengan lampiran, lalu klik Kutools > Balas dengan Lampiran > Balas Semua dengan Lampiran, lihat tangkapan layar:

2. Dan jendela pesan balasan dibuka dengan lampiran asli, lalu tulis pesan Anda dan kirimkan, lihat tangkapan layar:

dok balas semua dengan lampiran 7

Klik untuk mengunduh Kutools for Outlook dan uji coba gratis sekarang!


Alat Produktivitas Kantor Terbaik

Kutools untuk Outlook - Lebih dari 100 Fitur Canggih untuk Meningkatkan Outlook Anda

🤖 Asisten Surat AI: Email profesional instan dengan keajaiban AI--satu klik untuk mendapatkan balasan jenius, nada sempurna, penguasaan multibahasa. Ubah email dengan mudah! ...

📧 Email Otomatis: Di Luar Kantor (Tersedia untuk POP dan IMAP)  /  Jadwal Kirim Email  /  Auto CC/BCC Sesuai Aturan Saat Mengirim Email  /  Penerusan Otomatis (Aturan Lanjutan)   /  Tambah Salam Otomatis   /  Secara Otomatis Membagi Email Multi-Penerima menjadi Pesan Individual ...

📨 email Management: Mengingat Email dengan Mudah  /  Blokir Email Penipuan berdasarkan Subjek dan Lainnya  /  Hapus Email Duplikat  /  Pencarian  /  Konsolidasi Folder ...

📁 Lampiran ProPenyimpanan Batch  /  Pelepasan Batch  /  Kompres Batch  /  Penyimpanan otomatis   /  Lepaskan Otomatis  /  Kompres Otomatis ...

🌟 Antarmuka Ajaib: 😊Lebih Banyak Emoji Cantik dan Keren   /  Tingkatkan Produktivitas Outlook Anda dengan Tampilan Tab  /  Minimalkan Outlook Daripada Menutup ...

👍 Keajaiban sekali klik: Balas Semua dengan Lampiran Masuk  /   Email Anti-Phishing  /  🕘Tampilkan Zona Waktu Pengirim ...

👩🏼‍🤝‍👩🏻 Kontak & Kalender: Batch Tambahkan Kontak Dari Email yang Dipilih  /  Bagi Grup Kontak menjadi Grup Individual  /  Hapus Pengingat Ulang Tahun ...

Lebih 100 Fitur Tunggu Eksplorasi Anda! Klik Di Sini untuk Menemukan Lebih Banyak.

 

 

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