Set different time to send multiiple email in outlook using vbaDelay Sending MailHow can I automatically send an email with delay from an Outlook inbox usign VBA?Outlook 2010 VBA Task with attachments“Run-time error '13': Type Mismatch.” when there is no email addressCopy data from worksheet to html file to mailHow to preserve/retain hyperlinks in email body when using RangetoHTML from ExcelExtract IP Addresses in Microsoft Outlook using macrosVBA .Attachments.Add method throwing errorVBA send email with template using the cell value as recipientsSend email with attachments VBAExcel VBA macro to send emails to unique users in rangeVBA Excel runtime error with Outlook GetNamespace(“MAPI”)
How do I determine what is "magic" and "bearing magic" for Detect Magic?
Where does the expression "triple-A" come from?
Is there a real-world mythological counterpart to WoW's "kill your gods for power" theme?
Will replacing a fake visa with a different fake visa cause me problems when applying for a legal study permit?
Is there a star over my head?
What is this unknown executable on my boot volume? Is it Malicious?
Can I disable a battery powered device by reversing half of its batteries?
How can I discourage sharing internal API keys within a company?
How are chord ratios developed exactly?
Do all humans have an identical nucleotide sequence for certain proteins, e.g haemoglobin?
ArcPy: define fields to keep, delete all other fields in a feature class
Parallel resistance in electric circuits
What is a realistic time needed to get a properly trained army?
Is low emotional intelligence associated with right-wing and prejudiced attitudes?
Does a gnoll speak both Gnoll and Abyssal, or is Gnoll a dialect of Abyssal?
What was the relationship between Einstein and Minkowski?
What exactly is a marshrutka (маршрутка)?
Were Roman public roads build by private companies?
Seized engine due to being run without oil
Is there a reliable way to hide/convey a message in vocal expressions (speech, song,...)
Do I need 3 RGB channels for a spectrogram CNN?
Where can I get an anonymous Rav Kav card issued?
Telling my mother that I have anorexia without panicking her
Gravity on an Orbital Ring
Set different time to send multiiple email in outlook using vba
Delay Sending MailHow can I automatically send an email with delay from an Outlook inbox usign VBA?Outlook 2010 VBA Task with attachments“Run-time error '13': Type Mismatch.” when there is no email addressCopy data from worksheet to html file to mailHow to preserve/retain hyperlinks in email body when using RangetoHTML from ExcelExtract IP Addresses in Microsoft Outlook using macrosVBA .Attachments.Add method throwing errorVBA send email with template using the cell value as recipientsSend email with attachments VBAExcel VBA macro to send emails to unique users in rangeVBA Excel runtime error with Outlook GetNamespace(“MAPI”)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I want to set a delivery time to send out multiple email. I decide input the Date and Time in Excel Column(for example in Column M).
I write the code that I can save the draft of email. After I finished my checking of the email. I will send it out. but can I use Vba
to setup the delivery time?
After I finished my checking then press send button. The email will delivery at a certain time which I set in Column M. Here is my code
Sub preview()
On Error GoTo Endnow
Application.ScreenUpdating = False
Dim WordDoc As Object
Dim WordFile As String
'WordFile = Application.GetOpenFilename(Title:="Select MS Word file", MultiSelect:=False)
WordFile = Cells(1, 1).Value
Set WordDoc = GetObject(WordFile)
Dim OutApp As Object, OutMail As Object, OutWordEditor As Object
Set OutApp = CreateObject("Outlook.Application")
On Error GoTo cleanup
Dim cell As Range
For Each cell In Columns("C").Cells.SpecialCells(xlCellTypeConstants)
If LCase(Cells(cell.Row, "B").Value) = "y" Then
Set OutMail = OutApp.CreateItem(0)
Set OutWordEditor = OutMail.GetInspector.WordEditor
On Error Resume Next
With OutMail
.To = cell.Value
.cc = cell.Offset(, 2)
.Subject = Cells(cell.Row, "G").Value
.Body = Cells(cell.Row, "F").Value
Set editor = .GetInspector.WordEditor
editor.Content.Paste
Set WordDoc = GetObject(WordFile)
WordDoc.Content.Copy
OutWordEditor.Content.Paste
OutWordEditor.Range(0).InsertBefore (Cells(cell.Row, "F").Value & vbCrLf & vbCrLf)
WordDoc.Close
.Attachments.Add (Cells(cell.Row, "H").Text)
.Attachments.Add (Cells(cell.Row, "I").Text)
'.Display
.Save
End With
On Error GoTo 0
Set OutMail = Nothing
End If
Next cell
cleanup:
Set OutApp = Nothing
Application.ScreenUpdating = True
Endnow:
End Sub
So how can I setup the delivery time using vba? Because It gets different delivery time for each recipients.
excel vba outlook outlook-vba outlook-2016
add a comment |
I want to set a delivery time to send out multiple email. I decide input the Date and Time in Excel Column(for example in Column M).
I write the code that I can save the draft of email. After I finished my checking of the email. I will send it out. but can I use Vba
to setup the delivery time?
After I finished my checking then press send button. The email will delivery at a certain time which I set in Column M. Here is my code
Sub preview()
On Error GoTo Endnow
Application.ScreenUpdating = False
Dim WordDoc As Object
Dim WordFile As String
'WordFile = Application.GetOpenFilename(Title:="Select MS Word file", MultiSelect:=False)
WordFile = Cells(1, 1).Value
Set WordDoc = GetObject(WordFile)
Dim OutApp As Object, OutMail As Object, OutWordEditor As Object
Set OutApp = CreateObject("Outlook.Application")
On Error GoTo cleanup
Dim cell As Range
For Each cell In Columns("C").Cells.SpecialCells(xlCellTypeConstants)
If LCase(Cells(cell.Row, "B").Value) = "y" Then
Set OutMail = OutApp.CreateItem(0)
Set OutWordEditor = OutMail.GetInspector.WordEditor
On Error Resume Next
With OutMail
.To = cell.Value
.cc = cell.Offset(, 2)
.Subject = Cells(cell.Row, "G").Value
.Body = Cells(cell.Row, "F").Value
Set editor = .GetInspector.WordEditor
editor.Content.Paste
Set WordDoc = GetObject(WordFile)
WordDoc.Content.Copy
OutWordEditor.Content.Paste
OutWordEditor.Range(0).InsertBefore (Cells(cell.Row, "F").Value & vbCrLf & vbCrLf)
WordDoc.Close
.Attachments.Add (Cells(cell.Row, "H").Text)
.Attachments.Add (Cells(cell.Row, "I").Text)
'.Display
.Save
End With
On Error GoTo 0
Set OutMail = Nothing
End If
Next cell
cleanup:
Set OutApp = Nothing
Application.ScreenUpdating = True
Endnow:
End Sub
So how can I setup the delivery time using vba? Because It gets different delivery time for each recipients.
excel vba outlook outlook-vba outlook-2016
You need to send a distinct email to every user if the delivery time should be different. You can only use.cc
if the delivery time is the same. Using MailItem.DeferredDeliveryTime Property
– Pᴇʜ
Mar 28 at 10:20
1
Possible duplicate of How can I automatically send an email with delay from an Outlook inbox usign VBA?
– Pᴇʜ
Mar 28 at 10:26
Thank you for your example, I will try it tonight and answer back to you tomorrow.
– Nicawong9147
Mar 28 at 10:32
@Nicawong9147 You mention Excel in the beginning of question narration but you are opening Word Document in code. Please clarify whether data is Excel spreadsheet or Word Document Table. Other point is you want to set some definite schedule Like Monday at 8:00 AM for all recipients or it varies from recipient to recipient. These clarifications may help someone attempting to answer your question.
– skkakkar
Mar 29 at 7:12
add a comment |
I want to set a delivery time to send out multiple email. I decide input the Date and Time in Excel Column(for example in Column M).
I write the code that I can save the draft of email. After I finished my checking of the email. I will send it out. but can I use Vba
to setup the delivery time?
After I finished my checking then press send button. The email will delivery at a certain time which I set in Column M. Here is my code
Sub preview()
On Error GoTo Endnow
Application.ScreenUpdating = False
Dim WordDoc As Object
Dim WordFile As String
'WordFile = Application.GetOpenFilename(Title:="Select MS Word file", MultiSelect:=False)
WordFile = Cells(1, 1).Value
Set WordDoc = GetObject(WordFile)
Dim OutApp As Object, OutMail As Object, OutWordEditor As Object
Set OutApp = CreateObject("Outlook.Application")
On Error GoTo cleanup
Dim cell As Range
For Each cell In Columns("C").Cells.SpecialCells(xlCellTypeConstants)
If LCase(Cells(cell.Row, "B").Value) = "y" Then
Set OutMail = OutApp.CreateItem(0)
Set OutWordEditor = OutMail.GetInspector.WordEditor
On Error Resume Next
With OutMail
.To = cell.Value
.cc = cell.Offset(, 2)
.Subject = Cells(cell.Row, "G").Value
.Body = Cells(cell.Row, "F").Value
Set editor = .GetInspector.WordEditor
editor.Content.Paste
Set WordDoc = GetObject(WordFile)
WordDoc.Content.Copy
OutWordEditor.Content.Paste
OutWordEditor.Range(0).InsertBefore (Cells(cell.Row, "F").Value & vbCrLf & vbCrLf)
WordDoc.Close
.Attachments.Add (Cells(cell.Row, "H").Text)
.Attachments.Add (Cells(cell.Row, "I").Text)
'.Display
.Save
End With
On Error GoTo 0
Set OutMail = Nothing
End If
Next cell
cleanup:
Set OutApp = Nothing
Application.ScreenUpdating = True
Endnow:
End Sub
So how can I setup the delivery time using vba? Because It gets different delivery time for each recipients.
excel vba outlook outlook-vba outlook-2016
I want to set a delivery time to send out multiple email. I decide input the Date and Time in Excel Column(for example in Column M).
I write the code that I can save the draft of email. After I finished my checking of the email. I will send it out. but can I use Vba
to setup the delivery time?
After I finished my checking then press send button. The email will delivery at a certain time which I set in Column M. Here is my code
Sub preview()
On Error GoTo Endnow
Application.ScreenUpdating = False
Dim WordDoc As Object
Dim WordFile As String
'WordFile = Application.GetOpenFilename(Title:="Select MS Word file", MultiSelect:=False)
WordFile = Cells(1, 1).Value
Set WordDoc = GetObject(WordFile)
Dim OutApp As Object, OutMail As Object, OutWordEditor As Object
Set OutApp = CreateObject("Outlook.Application")
On Error GoTo cleanup
Dim cell As Range
For Each cell In Columns("C").Cells.SpecialCells(xlCellTypeConstants)
If LCase(Cells(cell.Row, "B").Value) = "y" Then
Set OutMail = OutApp.CreateItem(0)
Set OutWordEditor = OutMail.GetInspector.WordEditor
On Error Resume Next
With OutMail
.To = cell.Value
.cc = cell.Offset(, 2)
.Subject = Cells(cell.Row, "G").Value
.Body = Cells(cell.Row, "F").Value
Set editor = .GetInspector.WordEditor
editor.Content.Paste
Set WordDoc = GetObject(WordFile)
WordDoc.Content.Copy
OutWordEditor.Content.Paste
OutWordEditor.Range(0).InsertBefore (Cells(cell.Row, "F").Value & vbCrLf & vbCrLf)
WordDoc.Close
.Attachments.Add (Cells(cell.Row, "H").Text)
.Attachments.Add (Cells(cell.Row, "I").Text)
'.Display
.Save
End With
On Error GoTo 0
Set OutMail = Nothing
End If
Next cell
cleanup:
Set OutApp = Nothing
Application.ScreenUpdating = True
Endnow:
End Sub
So how can I setup the delivery time using vba? Because It gets different delivery time for each recipients.
excel vba outlook outlook-vba outlook-2016
excel vba outlook outlook-vba outlook-2016
edited Mar 28 at 19:14
0m3r
8,4509 gold badges25 silver badges55 bronze badges
8,4509 gold badges25 silver badges55 bronze badges
asked Mar 28 at 9:22
Nicawong9147Nicawong9147
115 bronze badges
115 bronze badges
You need to send a distinct email to every user if the delivery time should be different. You can only use.cc
if the delivery time is the same. Using MailItem.DeferredDeliveryTime Property
– Pᴇʜ
Mar 28 at 10:20
1
Possible duplicate of How can I automatically send an email with delay from an Outlook inbox usign VBA?
– Pᴇʜ
Mar 28 at 10:26
Thank you for your example, I will try it tonight and answer back to you tomorrow.
– Nicawong9147
Mar 28 at 10:32
@Nicawong9147 You mention Excel in the beginning of question narration but you are opening Word Document in code. Please clarify whether data is Excel spreadsheet or Word Document Table. Other point is you want to set some definite schedule Like Monday at 8:00 AM for all recipients or it varies from recipient to recipient. These clarifications may help someone attempting to answer your question.
– skkakkar
Mar 29 at 7:12
add a comment |
You need to send a distinct email to every user if the delivery time should be different. You can only use.cc
if the delivery time is the same. Using MailItem.DeferredDeliveryTime Property
– Pᴇʜ
Mar 28 at 10:20
1
Possible duplicate of How can I automatically send an email with delay from an Outlook inbox usign VBA?
– Pᴇʜ
Mar 28 at 10:26
Thank you for your example, I will try it tonight and answer back to you tomorrow.
– Nicawong9147
Mar 28 at 10:32
@Nicawong9147 You mention Excel in the beginning of question narration but you are opening Word Document in code. Please clarify whether data is Excel spreadsheet or Word Document Table. Other point is you want to set some definite schedule Like Monday at 8:00 AM for all recipients or it varies from recipient to recipient. These clarifications may help someone attempting to answer your question.
– skkakkar
Mar 29 at 7:12
You need to send a distinct email to every user if the delivery time should be different. You can only use
.cc
if the delivery time is the same. Using MailItem.DeferredDeliveryTime Property– Pᴇʜ
Mar 28 at 10:20
You need to send a distinct email to every user if the delivery time should be different. You can only use
.cc
if the delivery time is the same. Using MailItem.DeferredDeliveryTime Property– Pᴇʜ
Mar 28 at 10:20
1
1
Possible duplicate of How can I automatically send an email with delay from an Outlook inbox usign VBA?
– Pᴇʜ
Mar 28 at 10:26
Possible duplicate of How can I automatically send an email with delay from an Outlook inbox usign VBA?
– Pᴇʜ
Mar 28 at 10:26
Thank you for your example, I will try it tonight and answer back to you tomorrow.
– Nicawong9147
Mar 28 at 10:32
Thank you for your example, I will try it tonight and answer back to you tomorrow.
– Nicawong9147
Mar 28 at 10:32
@Nicawong9147 You mention Excel in the beginning of question narration but you are opening Word Document in code. Please clarify whether data is Excel spreadsheet or Word Document Table. Other point is you want to set some definite schedule Like Monday at 8:00 AM for all recipients or it varies from recipient to recipient. These clarifications may help someone attempting to answer your question.
– skkakkar
Mar 29 at 7:12
@Nicawong9147 You mention Excel in the beginning of question narration but you are opening Word Document in code. Please clarify whether data is Excel spreadsheet or Word Document Table. Other point is you want to set some definite schedule Like Monday at 8:00 AM for all recipients or it varies from recipient to recipient. These clarifications may help someone attempting to answer your question.
– skkakkar
Mar 29 at 7:12
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55394021%2fset-different-time-to-send-multiiple-email-in-outlook-using-vba%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55394021%2fset-different-time-to-send-multiiple-email-in-outlook-using-vba%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You need to send a distinct email to every user if the delivery time should be different. You can only use
.cc
if the delivery time is the same. Using MailItem.DeferredDeliveryTime Property– Pᴇʜ
Mar 28 at 10:20
1
Possible duplicate of How can I automatically send an email with delay from an Outlook inbox usign VBA?
– Pᴇʜ
Mar 28 at 10:26
Thank you for your example, I will try it tonight and answer back to you tomorrow.
– Nicawong9147
Mar 28 at 10:32
@Nicawong9147 You mention Excel in the beginning of question narration but you are opening Word Document in code. Please clarify whether data is Excel spreadsheet or Word Document Table. Other point is you want to set some definite schedule Like Monday at 8:00 AM for all recipients or it varies from recipient to recipient. These clarifications may help someone attempting to answer your question.
– skkakkar
Mar 29 at 7:12