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

วิธีเปลี่ยนชื่อไฟล์แนบในหน้าต่าง Outlook โดยไม่บันทึกลงดิสก์

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

บันทึกและเปลี่ยนชื่อไฟล์แนบโดยอัตโนมัติด้วยรหัส VBA ใน Outlook
เปลี่ยนชื่อไฟล์แนบในอีเมลได้อย่างง่ายดายโดยไม่ต้องบันทึกลงดิสก์ด้วย Kutools for Outlook


บันทึกและเปลี่ยนชื่อไฟล์แนบด้วยรหัส VBA ใน Outlook

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

1 ใน เอกสาร สร้างโฟลเดอร์ใหม่ชื่อ Attachments เพื่อบันทึกและเปลี่ยนชื่อไฟล์แนบของอีเมลที่เลือก

2. เลือกอีเมลที่มีไฟล์แนบที่คุณต้องการบันทึกและเปลี่ยนชื่อด้วยวันที่แก้ไข

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

รหัส VBA: บันทึกไฟล์แนบและเพิ่มวันที่แก้ไขก่อนชื่อไฟล์

Public Sub saveattachmentsadddate()
	Dim itm As Outlook.MailItem
	Dim currentExplorer As Explorer
	Dim Selection As Selection
	Dim objAtt As Outlook.Attachment
	Dim saveFolder As String
	Dim fso As Object
	Dim oldName
	Dim file As String
	Dim DateFormat As String
	Dim newName As String
	Dim enviro As String
	enviro              = CStr(Environ("USERPROFILE"))
	saveFolder          = enviro & "\Documents\Attachments\"
	Set currentExplorer = Application.ActiveExplorer
	Set Selection       = currentExplorer.Selection
	Set fso             = CreateObject("Scripting.FileSystemObject")
	On Error Resume Next
	For Each itm In Selection
		For Each objAtt In itm.Attachments
			file = saveFolder & objAtt.DisplayName
			objAtt.SaveAsFile file
			'Get the file name
			Set oldName  = fso.GetFile(file)
			DateFormat   = Format(oldName.DateLastModified, "yyyy-mm-dd ")
			newName      = DateFormat & objAtt.DisplayName
			oldName.Name = newName
			Set objAtt   = Nothing
		Next
	Next
	Set fso = Nothing
End Sub

4 กด F5 คีย์เพื่อเรียกใช้รหัสและไฟล์แนบในอีเมลที่เลือกจะถูกบันทึกลงในโฟลเดอร์ "\ Documents \ Attachments \" และเพิ่มวันที่แก้ไขล่าสุดของไฟล์แนบเป็นคำนำหน้าชื่อไฟล์แนบดั้งเดิมโดยอัตโนมัติ

หมายเหตุ / รายละเอียดเพิ่มเติม:

1. หากคุณต้องการเปลี่ยนชื่อไฟล์แนบใด ๆ ในอีเมลที่เลือกแทนที่จะเป็นไฟล์จำนวนมากวิธีนี้ใช้ไม่ได้
2. รหัสนี้จะบันทึกและเปลี่ยนชื่อวัตถุอื่น ๆ เช่นรูปภาพแผนภูมิรูปร่างและอื่น ๆ ในเนื้อหาอีเมล

เปลี่ยนชื่อไฟล์แนบในอีเมลได้อย่างง่ายดายโดยไม่ต้องบันทึกลงดิสก์ด้วย Kutools for Outlook

ที่นี่ขอแนะนำ เปลี่ยนชื่อไฟล์แนบ คุณลักษณะของ Kutools สำหรับ Outlook. ด้วยคุณสมบัตินี้คุณสามารถเปลี่ยนชื่อไฟล์แนบในหน้าต่าง Outlook ได้โดยตรงโดยไม่ต้องบันทึกลงดิสก์

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

1. หลังจากติดตั้ง Kutools สำหรับ Outlookโปรดเลือกอีเมลที่คุณจะเปลี่ยนชื่อไฟล์แนบจากนั้นคลิก Kutools > เครื่องมือแนบ > เปลี่ยนชื่อทั้งหมด.

2 ใน เปลี่ยนชื่อไฟล์แนบ คุณจะเห็นชื่อไฟล์แนบทั้งหมดของอีเมลที่เลือกอยู่ในไฟล์ Name คอลัมน์. โปรดดับเบิลคลิกที่ชื่อไฟล์แนบเพื่อแก้ไขจากนั้นคลิกที่ไฟล์ OK เพื่อบันทึกการเปลี่ยนแปลง
เคล็ดลับ: คุณสามารถแก้ไขชื่อไฟล์แนบทั้งหมดหรือปรับเปลี่ยนชื่อไฟล์แนบใด ๆ ก็ได้ตามที่คุณต้องการในกล่องโต้ตอบ

จากนั้นไฟล์แนบจะถูกเปลี่ยนชื่อในหน้าต่างอีเมลที่เลือก 

หมายเหตุ: คุณสามารถเปลี่ยนชื่อไฟล์แนบบางไฟล์ได้โดยเลือกในบานหน้าต่างการอ่านคลิก Kutools > ตั้งชื่อใหม่ในกล่องโต้ตอบเปลี่ยนชื่อพิมพ์ชื่อใหม่ในไฟล์ Name จากนั้นคลิกที่ไฟล์ OK ปุ่มเพื่อบันทึก ดูภาพหน้าจอ:

หากคุณต้องการทดลองใช้ยูทิลิตีนี้ฟรีโปรดไปที่ ดาวน์โหลดซอฟต์แวร์ฟรี ก่อนแล้วไปใช้การดำเนินการตามขั้นตอนข้างต้น


บทความที่เกี่ยวข้อง:


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

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

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

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

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

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

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

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

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

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

 

 

Comments (9)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Well, that didn't work. Thanks for nothing.
This comment was minimized by the moderator on the site
Dear Mike,
Any problem with the method, please don't hesitate to let me know. Thank you for your comment.
This comment was minimized by the moderator on the site
I can only echo previous comments: I would like to be able to re-name the file when I forward it. I wouldn't want to re-name the original that I received from a client. I need to be able to re-name when I'm passing on files internally and they need to comply with internal naming conventions. It's a shame that this is not available.
This comment was minimized by the moderator on the site
Dear SG,
The suggestion was adopted. We are trying to enhance the function to be more useful. We really appreciate your advice.
This comment was minimized by the moderator on the site
I think it is essential that you can re-name files in message that you want to forward. I need to keep the original name of a file in the original e-mail, but re-name to comply with internal naming conventions before I pass it on internally. So, I need to be able to see both entries.
This comment was minimized by the moderator on the site
Nice tool with the Kutools add on. There is a condition I think is confusing people. You can't rename it in the message if you pop the message out of the main Outlook Window. You have to be in the main Outlook interface, highlight the attachment, then the ATTACHMENT TOOLS tab turns on. There, appears a second KUTOOLS tab with the rename option in the original email.
This comment was minimized by the moderator on the site
Nice tool with Kutools! I find that the rename option is available on the original email only if you haven't popped the email out of the Outlook Interface. The Attachment Tools tab is highlighted and you have to switch to the Kutools tab under the Attachment Tools tab. I think that is where people are getting confused.
This comment was minimized by the moderator on the site
Nice software, but it sucks that you can only change the name of the file AFTER an email has been sent. That defeats the purpose. Want to change the name when creating a new email just after having attached the file BEFORE sending out.
This comment was minimized by the moderator on the site
yes, want to change name before send out, the feature is very important to us.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations