Ana içeriğe atla

Outlook'ta orijinal e-posta mesajıyla otomatik olarak nasıl yanıtlanır?

Normalde, e-postayı ofis dışında otomatik olarak kullanmak için bir kural oluşturduğumuzda, ancak gövdedeki orijinal mesaj dahil edilmeyecektir. Outlook'ta orijinal mesaj içeren e-postalara otomatik olarak nasıl güvenebilirsiniz? Bu makalede, Outlook'ta bu işi olabildiğince çabuk bitirmenize yardımcı olacak bir VBA kodundan bahsedeceğim.

VBA kodu ile görünümde orijinal mesajla otomatik yanıt e-postaları


VBA kodu ile görünümde orijinal mesajla otomatik yanıt e-postaları

Normal Outlook kuralı, işle başa çıkmanıza yardımcı olamaz, ancak aşağıdaki VBA kodu ile bunu hızlı ve kolay bir şekilde bitirebilirsiniz. Lütfen şunu yapın:

1. Basılı tutun ALT + F11 tuşlarını açmak için Uygulamalar için Microsoft Visual Basic pencere.

2. In Uygulamalar için Microsoft Visual Basic pencere, çift tıklama BuOutlookSession dan Proje1 (VbaProject.OTM) bölmesini açın ve ardından aşağıdaki kodu kopyalayıp boş modüle yapıştırın.

VBA kodu: Orijinal mesajla otomatik yanıt e-postaları:

Public WithEvents xlItems As Outlook.Items
Private Sub Application_Startup()
    Set xlItems = Session.GetDefaultFolder(olFolderInbox).Items
End Sub
Private Sub xlItems_ItemAdd(ByVal objItem As Object)
Dim xlReply As MailItem
Dim xStr As String
If objItem.Class <> olMail Then Exit Sub
Set xlReply = objItem.Reply
With xlReply
     xStr = "<p>" & "Hi, Your email has been received. Thank you!" & "</p>"
     .HTMLBody = xStr & .HTMLBody
     .Send
End With
End Sub 

3. Ardından kod penceresini kaydedin ve kapatın, VBA kodunun etkili olması için Outlook'u kapatın veya yeniden başlatın. Şimdi, e-posta aldığınızda, Outlook, gösterilen aşağıdaki ekran görüntüsü gibi orijinal mesajla otomatik bir yanıt gönderecek:


En İyi Ofis Üretkenlik Araçları

Outlook için Kutools - Outlook'unuzu Güçlendirecek 100'den Fazla Güçlü Özellik

🤖 AI Posta Yardımcısı: Yapay zeka büyüsüyle anında profesyonel e-postalar: tek tıkla dahice yanıtlar, mükemmel ton, çok dilli ustalık. E-posta göndermeyi zahmetsizce dönüştürün! ...

???? E-posta Otomasyonu: Ofis Dışında (POP ve IMAP için kullanılabilir)  /  E-posta Gönderimini Planla  /  E-posta Gönderirken Kurallara Göre Otomatik CC/BCC  /  Otomatik İletme (Gelişmiş Kurallar)   /  Otomatik Karşılama Ekleme   /  Çok Alıcılı E-postaları Otomatik Olarak Bireysel Mesajlara Bölün ...

📨 E-posta Yönetimi: E-postaları Kolayca Geri Çağırın  /  Dolandırıcılık E-postalarını Konulara ve Diğerlerine Göre Engelleyin  /  Yinelenen E-postaları Silin  /  gelişmiş Arama  /  Klasörleri Birleştir ...

📁 Ekler ProToplu Kaydetme  /  Toplu Ayır  /  Toplu Sıkıştırma  /  Otomatik kaydet   /  Otomatik Ayır  /  Otomatik Sıkıştır ...

🌟 Arayüz Büyüsü: 😊Daha Fazla Güzel ve Havalı Emoji   /  Sekmeli Görünümlerle Outlook Verimliliğinizi Artırın  /  Outlook'u Kapatmak Yerine Küçültün ...

👍 Tek Tıklamayla Harikalar: Tümünü Gelen Eklerle Yanıtla  /   Kimlik Avına Karşı E-postalar  /  🕘Gönderenin Saat Dilimini Göster ...

👩🏼‍🤝‍👩🏻 Kişiler ve Takvim: Seçilen E-postalardan Toplu Kişi Ekleme  /  Kişi Grubunu Bireysel Gruplara Bölme  /  Doğum Günü Hatırlatıcılarını Kaldır ...

üzerinde 100 Özellikler Keşfinizi Bekleyin! Daha Fazlasını Keşfetmek İçin Buraya Tıklayın.

 

 

Comments (8)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hello

I have another question. How can I change the Session.GetDefaultFolder(olFolderInbox).Items. I work with several email accounts and I need this response just from 3 of them.

Thank you in advance
This comment was minimized by the moderator on the site
Hi,
I have another question:
How do I apply this rule to a specific selected sender only
Session.GetDefaultFolder(olFolderInbox).Items
This comment was minimized by the moderator on the site
HiI have the same question : how do I apply this rule to selected sender only ?br
This comment was minimized by the moderator on the site
Hello, Damien,For specifying some senders when auto reply, please apply the below code:

<div data-tag="code">Public WithEvents xlItems As Outlook.Items
Private Sub Application_Startup()
Set xlItems = Session.GetDefaultFolder(olFolderInbox).Items
End Sub
Private Sub xlItems_ItemAdd(ByVal objItem As Object)
Dim xlReply As MailItem
Dim xStr As String
Dim xSenderAddr As String
On Error Resume Next
If objItem.Class <> olMail Then Exit Sub
xSenderAddr = "," 'type your own sender emials here, separate them by commas.
If objItem.Sender.Type = "EX" Then
If InStr(xSenderAddr, objItem.Sender.GetExchangeUser.PrimarySmtpAddress) = 0 Then Exit Sub
Else
If InStr(xSenderAddr, objItem.Sender.Address) = 0 Then Exit Sub
End If
Set xlReply = objItem.Reply
With xlReply
xStr = "<p>" & "Hi, Your email has been received. Thank you!" & "</p>"
.HTMLBody = xStr & .HTMLBody
.Send
End With
End SubPlease try, hope it can help you!
This comment was minimized by the moderator on the site
Hi , I've try this , but wouldn't work (:
This comment was minimized by the moderator on the site
How can you modify this to only run if there is a keyword in the message of the body?
This comment was minimized by the moderator on the site
I have the same question, did you figure it out?
This comment was minimized by the moderator on the site
try thisDim olMail As object
If (olMail.Subject Like "*Place_Keyword_here(Leave_doublequotes_and_asteriscs)*") Then
CodeEnd if
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations