ไปยังเนื้อหาหลัก

จะตอบกลับทั้งหมดด้วยไฟล์แนบต้นฉบับใน Outlook ได้อย่างไร

โดยปกติเมื่อคุณใช้ฟังก์ชันตอบกลับทั้งหมดเพื่อตอบกลับข้อความไปยังผู้รับทั้งหมดใน Outlook ไฟล์แนบต้นฉบับจะหายไปโดยอัตโนมัติ เป็นไปได้ไหมที่จะแนบไฟล์แนบต้นฉบับเมื่อตอบกลับทั้งหมดใน Outlook

ตอบกลับทั้งหมดด้วยไฟล์แนบต้นฉบับพร้อมรหัส VBA

ตอบกลับทั้งหมดด้วยไฟล์แนบต้นฉบับด้วย Kutools for Outlook


ตอบกลับทั้งหมดด้วยไฟล์แนบต้นฉบับพร้อมรหัส VBA

ไม่มีคุณลักษณะโดยตรงที่จะจัดการกับงานนี้ใน Outlook แต่คุณสามารถใช้รหัส VBA ต่อไปนี้เพื่อให้บรรลุได้ โปรดทำตามขั้นตอนด้านล่าง:

1. เปิด Outlook จากนั้นกดไฟล์ ALT + F11 คีย์เพื่อเปิด Microsoft Visual Basic สำหรับแอปพลิเคชัน หน้าต่าง

2. ใน Microsoft Visual Basic สำหรับแอปพลิเคชัน ดับเบิลคลิก นี้OutlookSession จาก โครงการ 1 (VbaProject.O ™) บานหน้าต่างเพื่อเปิดโหมดจากนั้นคัดลอกและวางรหัสต่อไปนี้ลงในโมดูลเปล่า

รหัส VBA: ตอบทุกคนด้วย 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

เอกสารตอบกลับทั้งหมดพร้อมไฟล์แนบ 1

3. จากนั้นคลิก เครื่องมือ > อ้างอิง ใน Microsoft Visual Basic สำหรับแอปพลิเคชัน ในหน้าต่างที่โผล่ออกมา เอกสารอ้างอิง - โครงการ 1 กล่องโต้ตอบตรวจสอบ รันไทม์การเขียนสคริปต์ของ Microsoft ตัวเลือกจาก อ้างอิงที่มีอยู่ กล่องรายการดูภาพหน้าจอ:

เอกสารตอบกลับทั้งหมดพร้อมไฟล์แนบ 9

4. จากนั้นให้บันทึกและปิดหน้าต่างโค้ด จากนั้นคุณสามารถเพิ่มปุ่มมาโครลงในได้ แถบเครื่องมือด่วน.

5. เปิดอีเมลที่คุณต้องการตอบกลับทั้งหมดพร้อมไฟล์แนบ ระบุความประสงค์หรือขอข้อมูลเพิ่มเติม หน้าต่าง จากนั้นเลือก คำสั่งเพิ่มเติม จาก ปรับแต่งแถบเครื่องมือด่วน แบบเลื่อนลงดูภาพหน้าจอ:

เอกสารตอบกลับทั้งหมดพร้อมไฟล์แนบ 2

6. ใน ตัวเลือกของ outlook ไดอะล็อกบ็อกซ์ให้ดำเนินการดังต่อไปนี้:

(1. ) เลือก แมโคร จาก เลือกคำสั่งจาก รายการแบบหล่นลง

(2.) คลิกชื่อมาโครที่คุณใส่ไว้ตอนนี้

(3. ) จากนั้นคลิก เพิ่ม ปุ่มเพื่อเพิ่มแมโครลงใน ปรับแต่งแถบเครื่องมือด่วน.

เอกสารตอบกลับทั้งหมดพร้อมไฟล์แนบ 3

7. จากนั้นคลิก OK เพื่อปิดกล่องโต้ตอบ ขณะนี้ปุ่มมาโครถูกแทรกลงในแล้ว แถบเครื่องมือด่วนดูภาพหน้าจอ:

เอกสารตอบกลับทั้งหมดพร้อมไฟล์แนบ 4

8. ตอนนี้คลิกปุ่มมาโครและหน้าต่างข้อความตอบกลับพร้อมไฟล์แนบต้นฉบับจะเปิดขึ้น จากนั้นจึงเขียนข้อความตอบกลับแล้วคลิก ส่ง ปุ่มดูภาพหน้าจอ:

เอกสารตอบกลับทั้งหมดพร้อมไฟล์แนบ 5


ตอบกลับทั้งหมดด้วยไฟล์แนบต้นฉบับด้วย Kutools for Outlook

ถ้าคุณมี Kutools สำหรับ Outlookเดียวกันกับที่ ตอบกลับทั้งหมดพร้อมไฟล์แนบ คุณสมบัติคุณสามารถตอบกลับทั้งหมดพร้อมแนบไฟล์ได้เพียงคลิกเดียว

Kutools สำหรับ Outlook : ด้วย Add-in ของ Outlook ที่มีประโยชน์มากกว่า 100 รายการให้ทดลองใช้ฟรีโดยไม่มีข้อ จำกัด ใน 60 วัน. 

หลังจากการติดตั้ง Kutools สำหรับ Outlookโปรดทำตามนี้:

1. เลือกข้อความที่คุณต้องการตอบกลับทั้งหมดพร้อมไฟล์แนบ จากนั้นคลิก Kutools > ตอบกลับด้วยไฟล์แนบ > ตอบกลับทั้งหมดพร้อมไฟล์แนบดูภาพหน้าจอ:

2. และหน้าต่างข้อความตอบกลับจะเปิดขึ้นพร้อมไฟล์แนบต้นฉบับ จากนั้นเขียนข้อความของคุณและส่งไป ดูภาพหน้าจอ:

เอกสารตอบกลับทั้งหมดพร้อมไฟล์แนบ 7

คลิกเพื่อดาวน์โหลด Kutools for Outlook และทดลองใช้ฟรีทันที!


สุดยอดเครื่องมือเพิ่มผลผลิตในสำนักงาน

Kutools สำหรับ Outlook - คุณสมบัติอันทรงพลังมากกว่า 100 รายการเพื่อเติมพลังให้กับ Outlook ของคุณ

🤖 ผู้ช่วยจดหมาย AI: ส่งอีเมลระดับมืออาชีพทันทีด้วยเวทมนตร์ AI คลิกเพียงครั้งเดียวเพื่อตอบกลับอย่างชาญฉลาด น้ำเสียงที่สมบูรณ์แบบ การเรียนรู้หลายภาษา เปลี่ยนรูปแบบการส่งอีเมลอย่างง่ายดาย! ...

📧 การทำงานอัตโนมัติของอีเมล: ไม่อยู่ที่สำนักงาน (ใช้ได้กับ POP และ IMAP)  /  กำหนดการส่งอีเมล  /  Auto CC/BCC ตามกฎเมื่อส่งอีเมล  /  ส่งต่ออัตโนมัติ (กฎขั้นสูง)   /  เพิ่มคำทักทายอัตโนมัติ   /  แบ่งอีเมลผู้รับหลายรายออกเป็นข้อความส่วนตัวโดยอัตโนมัติ ...

📨 การจัดการอีเมล์: เรียกคืนอีเมลได้อย่างง่ายดาย  /  บล็อกอีเมลหลอกลวงตามหัวเรื่องและอื่นๆ  /  ลบอีเมลที่ซ้ำกัน  /  การค้นหาขั้นสูง  /  รวมโฟลเดอร์ ...

📁 ไฟล์แนบโปรบันทึกแบทช์  /  การแยกแบทช์  /  การบีบอัดแบบแบตช์  /  บันทึกอัตโนมัติ   /  ถอดอัตโนมัติ  /  บีบอัดอัตโนมัติ ...

🌟 อินเตอร์เฟซเมจิก: 😊อีโมจิที่สวยและเจ๋งยิ่งขึ้น   /  เพิ่มประสิทธิภาพการทำงาน Outlook ของคุณด้วยมุมมองแบบแท็บ  /  ลดขนาด Outlook แทนที่จะปิด ...

???? เพียงคลิกเดียวสิ่งมหัศจรรย์: ตอบกลับทั้งหมดด้วยไฟล์แนบที่เข้ามา  /   อีเมลต่อต้านฟิชชิ่ง  /  🕘 แสดงโซนเวลาของผู้ส่ง ...

👩🏼‍🤝‍👩🏻 รายชื่อและปฏิทิน: แบทช์เพิ่มผู้ติดต่อจากอีเมลที่เลือก  /  แบ่งกลุ่มผู้ติดต่อเป็นกลุ่มแต่ละกลุ่ม  /  ลบการแจ้งเตือนวันเกิด ...

เกิน คุณสมบัติ 100 รอการสำรวจของคุณ! คลิกที่นี่เพื่อค้นพบเพิ่มเติม

 

 

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