Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   send mail every days (http://www.outlookbanter.com/outlook-vba/102557-send-mail-every-days.html)

Christian W May 14th 10 07:24 PM

send mail every days
 
Hello friends,

Have a question about outlook 2007. I need to run a macro every days, this
macro send a mail with information of a SQL. Have the macro created and run
succesfull but how i can to do for run every days automatically ?

is possible schedulle this macro ?

Thanks in advnace and sorry by my english,

Christian Wis.

Michael Bauer [MVP - Outlook] May 16th 10 09:27 AM

send mail every days
 


This might help you:
http://www.vboffice.net/sample.html?...0&cmd=showitem

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
http://www.vboffice.net/product.html?lang=en


Am Fri, 14 May 2010 11:24:01 -0700 schrieb Christian W:

Hello friends,

Have a question about outlook 2007. I need to run a macro every days, this
macro send a mail with information of a SQL. Have the macro created and

run
succesfull but how i can to do for run every days automatically ?

is possible schedulle this macro ?

Thanks in advnace and sorry by my english,

Christian Wis.


Christian W May 17th 10 04:48 PM

send mail every days
 
Michael,

Excelent!!!!!!!!!


Thanks a lots

"Michael Bauer [MVP - Outlook]" wrote:



This might help you:
http://www.vboffice.net/sample.html?...0&cmd=showitem

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
http://www.vboffice.net/product.html?lang=en


Am Fri, 14 May 2010 11:24:01 -0700 schrieb Christian W:

Hello friends,

Have a question about outlook 2007. I need to run a macro every days, this
macro send a mail with information of a SQL. Have the macro created and

run
succesfull but how i can to do for run every days automatically ?

is possible schedulle this macro ?

Thanks in advnace and sorry by my english,

Christian Wis.

.


Christian W May 17th 10 06:40 PM

send mail every days
 
Michael,

This code work, but have a problem, when remainder is executed a error
message is showed by outlook "Microsoft Outlook has encountered a problem and
needs to close, sorry for the inconveniences"

How i can to solve ?

Thanks in advance.
Christian W



"Michael Bauer [MVP - Outlook]" wrote:



This might help you:
http://www.vboffice.net/sample.html?...0&cmd=showitem

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
http://www.vboffice.net/product.html?lang=en


Am Fri, 14 May 2010 11:24:01 -0700 schrieb Christian W:

Hello friends,

Have a question about outlook 2007. I need to run a macro every days, this
macro send a mail with information of a SQL. Have the macro created and

run
succesfull but how i can to do for run every days automatically ?

is possible schedulle this macro ?

Thanks in advnace and sorry by my english,

Christian Wis.

.


Christian W May 17th 10 07:25 PM

send mail every days
 
Michael,

and now have a problem with outlook, your code works, but outlook cancel
with a message error "Microsoft Outlook has encountered a problem and needs
to close, sorry for the inconveniences caused"

any idea ?

Thansk in advance,
Christian

"Michael Bauer [MVP - Outlook]" wrote:



This might help you:
http://www.vboffice.net/sample.html?...0&cmd=showitem

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
http://www.vboffice.net/product.html?lang=en


Am Fri, 14 May 2010 11:24:01 -0700 schrieb Christian W:

Hello friends,

Have a question about outlook 2007. I need to run a macro every days, this
macro send a mail with information of a SQL. Have the macro created and

run
succesfull but how i can to do for run every days automatically ?

is possible schedulle this macro ?

Thanks in advnace and sorry by my english,

Christian Wis.

.


Michael Bauer [MVP - Outlook] May 18th 10 07:51 AM

send mail every days
 


What happens if you walk through the code step by step? For that set a
breakpoint on the first line, and use f8 after the code execution has
stopped at that line.

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
http://www.vboffice.net/product.html?lang=en


Am Mon, 17 May 2010 11:25:01 -0700 schrieb Christian W:

Michael,

and now have a problem with outlook, your code works, but outlook cancel
with a message error "Microsoft Outlook has encountered a problem and

needs
to close, sorry for the inconveniences caused"

any idea ?

Thansk in advance,
Christian

"Michael Bauer [MVP - Outlook]" wrote:



This might help you:
http://www.vboffice.net/sample.html?...0&cmd=showitem

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
http://www.vboffice.net/product.html?lang=en


Am Fri, 14 May 2010 11:24:01 -0700 schrieb Christian W:

Hello friends,

Have a question about outlook 2007. I need to run a macro every days,

this
macro send a mail with information of a SQL. Have the macro created and

run
succesfull but how i can to do for run every days automatically ?

is possible schedulle this macro ?

Thanks in advnace and sorry by my english,

Christian Wis.

.


Diplodok[_2_] May 18th 10 04:43 PM

send mail every days
 
Hello Christian!
Try to use that as basic code
It have to be created in ThisOutlookSession

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As
Boolean)
Dim td As Date
Dim mi As MailItem
Set mi = Item.Copy
tdelay = DateAdd("d", 1, Now())
mi.DeferredDeliveryTime = tdelay
mi.Send
End Sub

That code create copy of your mail item to send and set its delivery
time in a day after.
You have to analyse some specific information in your message to
duplicate only items you need.
However, it clones copy of your item in Outbox

Reagrds, Andrey

Diplodok[_2_] May 18th 10 04:46 PM

send mail every days
 
Forgot!
It tested on Outlook 2003, not 2007
But it used not specific VB model, I hope
Andrey


All times are GMT +1. The time now is 05:04 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com