Ana içeriğe atla

Outlook'ta gecikmeli teslimat için varsayılan süre nasıl değiştirilir?

Gecikmeli teslimat seçeneğini etkinleştirirken ( Daha önce teslim etmeyin Aşağıdaki ekran görüntüsündeki seçenek) Outlook'ta bir e-posta için gönderme zamanı varsayılan olarak 5:00 olarak ayarlanmıştır. Gece geç saatlere kadar çalıştığınızı ve fazla mesai yaptığınızı başkalarının bilmesini istemediğinizi varsayalım. E-postalarınızı göndermeden önce gecikmeli teslimat seçeneğini etkinleştirmeniz gerekir. Seçeneği etkinleştirdikten sonra, varsayılan gönderme zamanını manuel olarak değiştirmeniz gerekir. Aksi takdirde, e-posta ertesi gün 5:00'den sonra gönderilecektir. Bu varsayılan teslimat süresini değiştirmenin bir yolu var mı?

Bu öğretici, Outlook'ta gecikmeli teslim seçeneğinin varsayılan süresini değiştirmenize yardımcı olacak bir VBA kodu sağlar.


VBA koduyla Outlook'ta gecikmeli teslimat için varsayılan zamanı değiştirin

Outlook'ta gecikmeli teslim seçeneğinin varsayılan süresini değiştirmek için aşağıdaki VBA kodunu uygulayabilirsiniz.

Aşağıdaki VBA kodunda:

İki kez belirtebilirsiniz: gecikme teslimat süresi ve gecikmeli teslimat seçeneği, zamanı etkinleştirir.

Örneğin, gecikmeli teslimat süresini 07:30 AM olarak ayarladınız ve gecikmeli teslimat seçeneğini 5:30 PM'den sonra otomatik olarak etkinleştirilecek şekilde ayarladınız. 07:30 - 5:30 saatleri arasında e-posta gönderdiğinizde, e-posta doğrudan gönderilecektir. 5:30 - 07:30 saatleri arasında bir e-posta gönderilirse, ertesi gün 07:30'dan sonra gönderilmesi planlanacaktır.

Lütfen betiği aşağıdaki gibi test edin.

1. Outlook'unuzu başlatın, Ara Toplam + F11 anahtarları aynı anda açmak için Uygulamalar için Microsoft Visual Basic pencere.

2. içinde Uygulamalar için Microsoft Visual Basic pencere, üzerine çift tıklayın Project1 > Microsoft Outlook Nesneleri > Bu OutlookOturumu açmak için ThisOutlookSession (Kod) penceresini açın ve ardından aşağıdaki kodu bu kod penceresine kopyalayın.

VBA kodu: Outlook'ta gecikmeli teslimat için varsayılan zamanı değiştirin

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
'Updated by Extendoffice & EWP 20230602
  Const xDelayTime As String = "07:30:00"  'The delay delivery time of emails
  Const xCompareTime As String = "17:30:00" 'The time to enable the delay delivery option
  Dim xMail As Outlook.MailItem
  Dim xWeekday As Integer
  Dim xNowTime As String
  Dim xIsDelay As Boolean
  Dim xRet1 As Integer
  Dim xRet2 As Integer
  On Error GoTo xError
  If (Item.Class <> olMail) Then Exit Sub
  Set xMail = Item
  xWeekday = Weekday(Date, vbMonday)
  xNowTime = Format(Now, "hh:nn:ss")
  xIsDelay = False
  xRet1 = StrComp(xNowTime, xDelayTime)
  xRet2 = StrComp(xNowTime, xCompareTime)
  If xRet1 = xRet2 Then
    xIsDelay = True
  End If
  If (xRet1 = -1) And (xRet2 = -1) Then
    xMail.DeferredDeliveryTime = Date & " " & xDelayTime
  Else
    If ((xWeekday = 5) And xIsDelay) Or (xWeekday = 6) Or (xWeekday = 7) Then
      xMail.DeferredDeliveryTime = (Date + (5 - xWeekday + 3)) & " " & xDelayTime
    ElseIf xIsDelay Then
      xMail.DeferredDeliveryTime = (Date + 1) & " " & xDelayTime
    End If
  End If
Exit Sub
xError:
  MsgBox "ItemSend: " & Err.Description, , "Kutools for Outlook"
End Sub

Notlar:

1) Gecikme süresini ve gecikmeli teslimat seçeneğini etkinleştirmek için aşağıdaki satırlarda zamanı değiştirebilirsiniz.
Const xDelayTime As String = "07:30:00"
Const xCompareTime As String = "17:30:00"
2) Hafta sonları e-posta gönderirken, Pazartesi günü saat 07:30'dan sonra gönderilmesi planlanacaktır.

3. Kodu kaydedin ve Ara Toplam + Q kapatmak için anahtarlar Uygulamalar için Microsoft Visual Basic pencere.

Şu andan itibaren, 07:30 - 5:30 saatleri arasında e-posta gönderdiğinizde, e-posta doğrudan gönderilecektir. 5:30 - 07:30 saatleri arasında bir e-posta gönderilirse, bir sonraki iş günü 07:30'dan sonra gönderilmesi planlanacaktır.


İlgili Makaleler

Outlook'ta Tüm Gün Olaylarının Varsayılan Hatırlatıcı Zamanını Değiştirin
Normalde, tüm gün olaylarının varsayılan anımsatıcı zamanı Outlook 18/2007'da 2010 saat ve Outlook 0.5'te 2013 gündür. Bazen, tüm gün olayların varsayılan anımsatıcı saati çalışma programınıza uymayabilir. Burada, Microsoft Outlook'taki tüm gün süren etkinliklerin varsayılan hatırlatma zamanını değiştirmenin yolunu tanıtacağız.

Outlook'ta Varsayılan Takip Süresini Değiştirin
Bildiğimiz gibi, Outlook'ta bir e-posta için takip hatırlatıcısı eklediğimizde, varsayılan takip süresi 4: 30'dur (veya çalışma saatinize bağlı olarak başka bir saattir). Ancak, varsayılan takip zamanını değiştirmek ve saat 9:00 gibi mesai saatlerinin başında size hatırlatmasına izin vermek isteyebilirsiniz. Bu makalede, Outlook'ta varsayılan takip süresini nasıl değiştireceğinizi göstereceğim.

Outlook'ta Varsayılan Arşiv Konumunu Değiştir
Varsayılan olarak Outlook, arşiv dosyaları için varsayılan konuma sahiptir. Varsayılan konumun yanı sıra, arşiv dosyalarınız için kendi arşiv konumunuzu da belirleyebilirsiniz. Bu eğiticide, Outlook'ta varsayılan arşiv konumunu nasıl değiştireceğinizi ayrıntılı olarak göstereceğiz.

Outlook'ta Varsayılan Ek Kaydetme Konumunu Değiştirin
Outlook'u her başlattığınızda belirlediğiniz ek konumunu bulmaktan bıktınız mı? Bu eğitimde, size varsayılan ek konumunu nasıl değiştireceğinizi göstereceğiz. Bundan sonra, Outlook'u yeniden başlatsanız bile ekleri her kaydettiğinizde belirtilen ek kaydetme klasörü otomatik olarak açılacaktır.

Outlook'ta Tüm Gün Olay Varsayılanını Meşgul Olarak Değiştir
Varsayılan olarak Outlook, randevuların ve toplantıların durumunu "Meşgul", ancak tüm gün süren etkinliklerin durumunu "Ücretsiz" olarak ayarlar (aşağıdaki ekran görüntüsüne bakın). Tüm gün süren bir etkinlik oluşturduğunuzda, Farklı Göster durumunu manuel olarak Meşgul olarak değiştirmeniz gerekir. Tüm gün süren etkinliklerin durumu olarak varsayılan gösteriyi Meşgul olarak değiştirmek için makale size iki yöntem sunar.


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 (41)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi

So useful! Can you add the option that if you are sending to people from within your organisation, this rule does not apply and emails are sent immediately?
This comment was minimized by the moderator on the site
Hi Crystal

This was just what I was looking for, it worked once, and I was very excited! Since then no matter what time of day, the emails send as soon as I click "Send". Any thoughts on what I've done wrong? I'd also love to be able to exclude 'high importance' flags.
This comment was minimized by the moderator on the site
Please ignore that request, seems it was to do with trust settings. Sorted now, thanks for the code!
This comment was minimized by the moderator on the site
I found that when you send an email on Sunday it is push to a week out as xMail.DeferredDeliveryTime = (Date + (vbSaturday - xWeekday + 2)) & " " & xDelayTime ends up with 8 days in the future instead of the expected one. As 7 (vbSaturday) - 1 (xWeekday on Sunday) + 2 is 8. This is my fix:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
'Updated by EWP 20230518
  Const xDelayTime As String = "07:30:00"  'The delay delivery time of emails
  Const xCompareTime As String = "17:30:00" 'The time to enable the delay delivery option
  Dim xMail As Outlook.MailItem
  Dim xWeekday As Integer
  Dim xNowTime As String
  Dim xIsDelay As Boolean
  Dim xRet1 As Integer
  Dim xRet2 As Integer
  On Error GoTo xError
  If (Item.Class <> olMail) Then Exit Sub
  Set xMail = Item
  xWeekday = Weekday(Date, vbMonday)
  xNowTime = Format(Now, "hh:nn:ss")
  xIsDelay = False
  xRet1 = StrComp(xNowTime, xDelayTime)
  xRet2 = StrComp(xNowTime, xCompareTime)
  If xRet1 = xRet2 Then
    xIsDelay = True
  End If
  If (xRet1 = -1) And (xRet2 = -1) Then
    xMail.DeferredDeliveryTime = Date & " " & xDelayTime
  Else
    If ((xWeekday = 5) And xIsDelay) Or (xWeekday = 6) Or (xWeekday = 7) Then
      xMail.DeferredDeliveryTime = (Date + (5 - xWeekday + 3)) & " " & xDelayTime
    ElseIf xIsDelay Then
      xMail.DeferredDeliveryTime = (Date + 1) & " " & xDelayTime
    End If
  End If
Exit Sub
xError:
  MsgBox "ItemSend: " & Err.Description, , "Kutools for Outlook"
End Sub
This comment was minimized by the moderator on the site
Hi Ehrin Pitts,

Thank you for the correction. I will check the code in the post and correct it.
This comment was minimized by the moderator on the site
This is a most useful piece of code, because it prevents me from disturbing people outside office hours.
However, I sometimes need to send an email outside normal hours and it is a nuisance to comment out the VBA code each time.
My suggestion is that if the "Importance" flage is set to high, then the mail will be sent immediately and not be delayed. Would it be possible for you to add such an exclusion in the code. (Still keeping the existing code, including the line with the xSenderAddress).
This comment was minimized by the moderator on the site
Hi Bernard,

The following VBA code helps to exclude the emails with a high importance flag. Please give it a try.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
'Updated by Extendoffice 20230410
  Const xDelayTime As String = "07:30:00"  'The delay delivery time of emails
  Const xCompareTime As String = "17:30:00" 'The time to enable the delay delivery option
  Dim xMail As Outlook.MailItem
  Dim xWeekday As Integer
  Dim xNowTime As String
  Dim xIsDelay As Boolean
  Dim xRet1 As Integer
  Dim xRet2 As Integer
  On Error GoTo xError
  If (Item.Class <> olMail) Then Exit Sub
  Set xMail = Item
  If xMail.Importance = olImportanceHigh Then Exit Sub 'Exclude emails with a high importance flag
  xWeekday = Weekday(Date, vbSunday)
  xNowTime = Format(Now, "hh:nn:ss")
  xIsDelay = False
  xRet1 = StrComp(xNowTime, xDelayTime)
  xRet2 = StrComp(xNowTime, xCompareTime)
  If xRet1 = xRet2 Then
    xIsDelay = True
  End If
  If (xRet1 = -1) And (xRet2 = -1) Then
    xMail.DeferredDeliveryTime = Date & " " & xDelayTime
  Else
    If ((xWeekday = vbFriday) And xIsDelay) Or (xWeekday = vbSaturday) Or (xWeekday = vbSunday) Then
      xMail.DeferredDeliveryTime = (Date + (vbSaturday - xWeekday + 2)) & " " & xDelayTime
    ElseIf xIsDelay Then
      xMail.DeferredDeliveryTime = (Date + 1) & " " & xDelayTime
    End If
  End If
Exit Sub
xError:
  MsgBox "ItemSend: " & Err.Description, , "Kutools for Outlook"
End Sub
This comment was minimized by the moderator on the site
Thanks for this macro. I often work late in the evenings or early in the mornings but don't want emails to be sent to my colleagues outside of normal working hours (for me, 08:00 to 17:45, which I've modified in the macro myself).

Is there a way to add an additional clause to the macro for sending emails, please? Currently, if I work early in the morning on a weekday (say 06:00, before the working day officially starts at 08:00) then the macro will delay sending until 08:00 on the following working day. I would rather the email was sent at 08:00 on the current working day. I tested your macro on a Thursday morning at 07:54 and the sending has been delayed until 08:00 on Friday, whereas I would want it to be sent on Thursday at 08:00.

Emails sent after the end of the working day should be sent at the start of the next working day, as you have written. Any emails sent at any time on Saturday or Sunday should be sent at the start of the next working day, again as you have written.

It's been a while since I've written anything substantial in VBA so I'm turning my head inside out trying to find the solution, with no success.
This comment was minimized by the moderator on the site
Hi Dom,

I am sorry to reply to you so late. The following VBA code can help. Please give it a try.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
'Updated by Extendoffice 20230410
  Const xDelayTime As String = "08:00:00"  'The delay delivery time of emails
  Const xCompareTime As String = "17:45:00" 'The time to enable the delay delivery option
  Dim xMail As Outlook.MailItem
  Dim xWeekday As Integer
  Dim xNowTime As String
  Dim xIsDelay As Boolean
  Dim xRet1 As Integer
  Dim xRet2 As Integer
  Dim xDelayInterval As Integer
  On Error GoTo xError
  If (Item.Class <> olMail) Then Exit Sub
  Set xMail = Item
  xWeekday = Weekday(Date, vbSunday)
  xNowTime = Format(Now, "hh:nn:ss")
  xIsDelay = False
  xRet1 = StrComp(xNowTime, xDelayTime)
  xRet2 = StrComp(xNowTime, xCompareTime)
  If xRet1 = xRet2 Then
    xIsDelay = True
  End If
  If (xRet1 = -1) And (xRet2 = -1) Then
    xMail.DeferredDeliveryTime = Date & " " & xDelayTime
  Else
    If ((xWeekday = vbFriday) And xIsDelay) Or (xWeekday = vbSaturday) Or (xWeekday = vbSunday) Then
      xMail.DeferredDeliveryTime = (Date + (vbSaturday - xWeekday + 2)) & " " & xDelayTime
    ElseIf xIsDelay Then
      xMail.DeferredDeliveryTime = (Date + 1) & " " & xDelayTime
    End If
  End If
Exit Sub
xError:
  MsgBox "ItemSend: " & Err.Description, , "Kutools for Outlook"
End Sub
This comment was minimized by the moderator on the site
Hi Crystal, the issue returned. No matter what time of day, the emails send as soon as I click "Send". Please let me know any advice. Thank you
This comment was minimized by the moderator on the site
Hi Angela,

The problem was reproduced in my case and we have updated the code. Please give it a try. Thank you for your comment.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
'Updated by Extendoffice 20230117
  Const xDelayTime As String = "07:30:00"  'The delay delivery time of emails
  Const xCompareTime As String = "17:30:00" 'The time to enable the delay delivery option
  
  Dim xMail As Outlook.MailItem
  Dim xWeekday As Integer
  Dim xNowTime As String
  Dim xIsDelay As Boolean
  On Error GoTo xError
  If (Item.Class <> olMail) Then Exit Sub
  Set xMail = Item
  xWeekday = Weekday(Date, vbSunday)
  xNowTime = Format(Now, "hh:nn:ss")
  xIsDelay = False
  If StrComp(xNowTime, xDelayTime) = StrComp(xNowTime, xCompareTime) Then
    xIsDelay = True
  End If
  If ((xWeekday = vbFriday) And xIsDelay) Or (xWeekday = vbSaturday) Or (xWeekday = vbSunday) Then
    xMail.DeferredDeliveryTime = (Date + (vbSaturday - xWeekday + 2)) & " " & xDelayTime
  ElseIf xIsDelay Then
    xMail.DeferredDeliveryTime = (Date + 1) & " " & xDelayTime
  End If
Exit Sub
xError:
  MsgBox "ItemSend: " & Err.Description, , "Kutools for Outlook"
End Sub
This comment was minimized by the moderator on the site
Hi Crystal,
I fixed the issue by closing the Outlook application and re-opening it after saving the VBA code. Thank you for this!
This comment was minimized by the moderator on the site
Hi Crystal, I followed your instructions and enabled macros, but the emails are still sending as soon as I click "Send".

I have Outlook version 2101 (Build 13628.20274).

1. I did not modify any variables in the code, so it is saved just as you have instructed for "ThisOutlookSession".
2. It is the only code in "ThisOutlookSession".
3. The current time is 3:19 AM Eastern Time, so I would expect the emails to be delayed upon clicking "Send" since I am attempting to send an email during the time period of 5:30 PM - 07:30 AM.
4. I verified the Macros are enabled.

Is there anything else you can suggest that could cause this macro not to work? Thank you

From the tutorial: "From now on, when you send an email during 07:30 AM - 5:30 PM, the email will be sent directly. If an email is sent during 5:30 PM – 07:30 AM, it will be scheduled to send after 07:30 AM the next workday."
This comment was minimized by the moderator on the site
Hi Crystal, I followed your instructions and enabled macros, but the emails are still sending as soon as I click "Send". I have Outlook version 2101 (Build 13628.20274).
This comment was minimized by the moderator on the site
This is awesome.

This is a longshot - but i have work and personal accounts in Outlook. Is there a way to set this only for certain accounts?
This comment was minimized by the moderator on the site
Hi Ann,
The following VBA script may help. Please give it a try.
In this line: xAccount = "Your email account", please replace the text "You email account" with your own account. For multiple accounts, please use a semicolon ";" to separate them.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
'Updated by Extendoffice 20230117
  Const xDelayTime As String = "07:30:00" 'The delay delivery time of emails
  Const xCompareTime As String = "17:30:00" 'The time to enable the delay delivery option
  
  Dim xMail As Outlook.MailItem
  Dim xWeekday As Integer
  Dim xNowTime As String
  Dim xIsDelay As Boolean
  Dim xSenderAddress As String
  Dim xAccount As String
  On Error GoTo xError
  If (Item.Class <> olMail) Then Exit Sub
  Set xMail = Item
  xSenderAddress = ""
  xSenderAddress = xMail.SendUsingAccount.SmtpAddress
  xAccount = "Your email account"  'Specify your email account here and use ; to separate different accounts
  If VBA.InStr(xAccount, xSenderAddress) = 0 Then Exit Sub
  xWeekday = Weekday(Date, vbSunday)
  xNowTime = Format(Now, "hh:nn:ss")
  xIsDelay = False
  If StrComp(xNowTime, xDelayTime) = StrComp(xNowTime, xCompareTime) Then
    xIsDelay = True
  End If
  Debug.Print xIsDelay
  If ((xWeekday = vbFriday) And xIsDelay) Or (xWeekday = vbSaturday) Or (xWeekday = vbSunday) Then
    xMail.DeferredDeliveryTime = (Date + (vbSaturday - xWeekday + 2)) & " " & xDelayTime
  ElseIf xIsDelay Then
    xMail.DeferredDeliveryTime = (Date + 1) & " " & xDelayTime
  End If
Exit Sub
xError:
  MsgBox "ItemSend: " & Err.Description, , "Kutools for Outlook"
End Sub
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations