Բաց թողնել հիմնական բովանդակությունը

Ինչպե՞ս փոխել հետաձգման լռելյայն ժամանակը Outlook-ում:

Հետաձգման առաքման տարբերակը միացնելիս (այ Նախկինում մի առաքեք տարբերակ հետևյալ սքրինշոթում) Outlook-ում էլփոստի համար ուղարկման ժամանակը լռելյայնորեն սահմանված է 5:00: Ենթադրենք, որ դուք աշխատում եք ուշ գիշերը և չեք ցանկանում, որ ուրիշներն իմանան, որ դուք արտաժամյա եք աշխատում: Դուք պետք է միացնեք ձեր էլ. նամակների հետաձգման առաքման տարբերակը՝ նախքան դրանք ուղարկելը: Ընտրանքը միացնելուց հետո դուք պետք է ձեռքով փոխեք ուղարկման կանխադրված ժամանակը: Հակառակ դեպքում նամակը կուղարկվի հաջորդ օրը 5:00-ից հետո: Կա՞ որևէ միջոց՝ փոխելու այս լռելյայն առաքման ժամանակը:

Այս ձեռնարկը տրամադրում է VBA կոդ, որը կօգնի ձեզ փոխել Outlook-ում հետաձգման առաքման տարբերակի կանխադրված ժամանակը:


Փոխեք Outlook-ում առաքման հետաձգման կանխադրված ժամանակը VBA կոդով

Դուք կարող եք կիրառել հետևյալ VBA կոդը՝ Outlook-ում հետաձգման առաքման տարբերակի կանխադրված ժամանակը փոխելու համար:

Հետևյալ VBA կոդում.

Դուք կարող եք նշել երկու անգամ հետաձգել առաքման ժամանակը եւ հետաձգման առաքման տարբերակը հնարավորություն է տալիս ժամանակը.

Օրինակ, դուք սահմանել եք հետաձգման առաքման ժամը 07:30-ին և սահմանել եք, որ հետաձգման առաքման տարբերակը ինքնաբերաբար միացվի 5:30-ից հետո: Երբ դուք նամակ եք ուղարկում առավոտյան 07:30-ից մինչև 5:30-ը, նամակն անմիջապես կուղարկվի: Եթե ​​նամակն ուղարկվում է 5:30-ից մինչև 07:30-ը, այն կուղարկվի հաջորդ օրը ժամը 07:30-ից հետո:

Խնդրում ենք ստուգել սցենարը հետևյալ կերպ.

1. Գործարկեք ձեր Outlook- ը, սեղմեք այն ալտ + F11 ստեղները միաժամանակ բացելու համար Microsoft Visual Basic հավելվածների համար պատուհան.

2. Մեջ Microsoft Visual Basic հավելվածների համար պատուհանը, կրկնակի սեղմեք Project1 > Microsoft Outlook օբյեկտներ > ԱյսOutlookSession- ը բացելու համար ThisOutlookSession (ծածկագիր) պատուհանում, այնուհետև պատճենեք հետևյալ կոդը այս կոդի պատուհանում:

VBA կոդը՝ փոխել Outlook-ում հետաձգման առաքման կանխադրված ժամանակը

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

Նշումներ:

1) Հետևյալ տողերում կարող եք փոխել հետաձգման ժամանակը և ժամանակը, որպեսզի միացնեք հետաձգման առաքման տարբերակը:
Const xDelayTime As String = «07:30:00»
Const xCompareTime As String = «17:30:00»
2) Հանգստյան օրերին էլ-նամակ ուղարկելիս այն կուղարկվի երկուշաբթի առավոտյան ժամը 07:30-ից հետո:

3. Պահեք կոդը և սեղմեք կոճակը ալտ + Q ստեղները փակելու համար Microsoft Visual Basic հավելվածների համար պատուհան.

Այսուհետ, երբ դուք նամակ եք ուղարկում առավոտյան 07:30 - 5:30-ն ընկած ժամանակահատվածում, նամակն անմիջապես կուղարկվի: Եթե ​​նամակն ուղարկվում է 5:30-ից մինչև 07:30-ը, այն կուղարկվի հաջորդ աշխատանքային օրը ժամը 07:30-ից հետո:


Առնչվող հոդվածներ

Փոխեք Outlook-ում շուրջօրյա իրադարձությունների կանխադրված հիշեցման ժամանակը
Սովորաբար, ամբողջ օրվա իրադարձության նախնական հիշեցման ժամանակը Outlook 18/2007- ում 2010 ժամ է և Outlook 0.5-ում 2013 օր: Երբեմն, ամբողջ օրվա իրադարձության նախնական հիշեցման ժամանակը կարող է չհամընկնել ձեր աշխատանքային գրաֆիկի հետ: Այստեղ մենք կներկայացնենք ամբողջ օրվա իրադարձությունների նախնական հիշեցման ժամանակը փոխելու եղանակը Microsoft Outlook- ում:

Փոխեք կանխադրված հետևելու ժամանակը Outlook-ում
Ինչպես գիտենք, երբ Outlook- ում էլփոստի համար հետևյալ հիշեցում ենք ավելացնում, հետևելու կանխադրված ժամանակը 4:30 է (կամ այլ ժամանակ `կախված ձեր աշխատանքային ժամերից): Այնուամենայնիվ, գուցե ցանկանաք փոխել հետևյալ կանխադրված ժամանակը և թույլ տվեք, որ դա ձեզ հիշեցնի աշխատանքային ժամերի սկզբում, օրինակ ՝ առավոտյան 9: 00-ին: Այս հոդվածում ես ձեզ ցույց կտամ, թե ինչպես փոխել Outlook- ի կանխադրված հետևման ժամանակը:

Փոխել կանխադրված արխիվի գտնվելու վայրը Outlook-ում
Լռելյայն, Outlook- ը արխիվային ֆայլերի նախնական տեղն ունի: Բացի լռելյայն տեղակայությունից, կարող եք ձեր արխիվային ֆայլերի համար դնել արխիվի սեփական դիրքը: Այս ձեռնարկում մենք ձեզ ցույց կտանք, թե ինչպես մանրամասնորեն փոխել արխիվի լռելյայն տեղը Outlook- ում:

Փոխեք կանխադրված կցորդի պահման վայրը Outlook- ում
Ձանձրացե՞լ եք Outlook- ը գործարկելիս ամեն անգամ նշած կցորդի գտնվելու վայրը գտնելու հարցում: Այս ձեռնարկում մենք ձեզ ցույց կտանք, թե ինչպես փոխել հավելվածի լռելյայն տեղը: Դրանից հետո նշված կցորդի պահպանման թղթապանակը ավտոմատ կերպով կբացվի ամեն անգամ կցորդները պահպանելիս, չնայած Outlook- ը վերագործարկում եք:

Outlook-ում ամբողջ օրվա իրադարձությունների լռելյայն փոխեք Busy-ի
Լռելյայնորեն, Outlook-ը նշանակում է հանդիպումների և հանդիպումների կարգավիճակը՝ «Զբաղված», իսկ ամբողջ օրվա իրադարձությունները՝ «Անվճար» (տես ստորև ներկայացված սքրինշոթը): Դուք պետք է ձեռքով փոխեք Ցուցադրել որպես կարգավիճակը Զբաղվածի ամեն անգամ, երբ ստեղծեք շուրջօրյա միջոցառում: Ամբողջօրյա իրադարձությունների լռելյայն ցուցադրման կարգավիճակը «Զբաղված» դարձնելու համար հոդվածը ձեզ երկու եղանակ է տրամադրում:


Գրասենյակի արտադրողականության լավագույն գործիքները

Outlook- ի համար նախատեսված գործիքներ - Ավելի քան 100 հզոր գործառույթ՝ ձեր Outlook-ը լիցքավորելու համար

🤖 AI Փոստի օգնական: Ակնթարթային պրոֆեսիոնալ նամակներ AI մոգությամբ. մեկ սեղմումով հանճարեղ պատասխաններ, կատարյալ հնչերանգներ, բազմալեզու վարպետություն: Փոխակերպեք էլ. փոստը առանց ջանքերի: ...

📧 Email ավտոմատացում: Գրասենյակից դուրս (հասանելի է POP-ի և IMAP-ի համար)  /  Ժամանակացույց ուղարկել նամակներ  /  Ավտոմատ CC/BCC էլփոստ ուղարկելիս կանոններով  /  Ավտոմատ փոխանցում (Ընդլայնված կանոններ)   /  Ավտոմատ ավելացնել ողջույնները   /  Ավտոմատ կերպով բաժանել բազմասերիստացող նամակները առանձին հաղորդագրությունների ...

📨 էլեկտրոնային կառավարման: Հեշտությամբ հիշեք նամակները  /  Արգելափակել խարդախության նամակները ըստ առարկաների և այլոց  /  Deleteնջել կրկնօրինակ նամակները  /  Ընդլայնված որոնում  /  Համախմբել Թղթապանակները ...

📁 Հավելվածներ ProԽմբաքանակի պահպանում  /  Խմբաքանակի անջատում  /  Խմբաքանակային կոմպրես  /  Auto Save- ը   /  Ավտոմատ անջատում  /  Ավտոմատ սեղմում ...

🌟 Ինտերֆեյս Magic: 😊Ավելի գեղեցիկ և զով էմոջիներ   /  Բարձրացրեք ձեր Outlook-ի արտադրողականությունը ներդիրներով դիտումների միջոցով  /  Նվազագույնի հասցնել Outlook-ը փակելու փոխարեն ...

???? Մեկ սեղմումով Հրաշքներ: Պատասխանել բոլորին մուտքային հավելվածներով  /   Հակաֆիշինգի էլ. նամակներ  /  🕘Ցուցադրել ուղարկողի ժամային գոտին ...

👩🏼‍🤝‍👩🏻 Կոնտակտներ և օրացույց: Խմբաքանակի ավելացրեք կոնտակտներ ընտրված էլ  /  Կոնտակտային խումբը բաժանեք առանձին խմբերի  /  Հեռացնել ծննդյան հիշեցումները ...

Over 100 Նկարագրություն Սպասեք ձեր հետազոտությանը: Սեղմեք այստեղ՝ ավելին բացահայտելու համար:

 

 

Comments (42)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi,
Would there be a way to change only the default delay time and NOT the time to enable the delay delivery option?
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).
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