send mail every days

Status
Not open for further replies.
C

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

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
This might help you:

http://www.vboffice.net/en/developers/send-emails-automatically

Best regards

Michael Bauer

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.
 
C

Christian W

Michael,

Excelent!!!!!!!!!

Thanks a lots

"Michael Bauer " wrote:



> This might help you:
> http://www.vboffice.net/en/developers/send-emails-automatically

> > Best regards
> Michael Bauer
> Category Manager -

> SAM - The Sending Account Manager:
>

> 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.

> .
>
 
C

Christian W

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 " wrote:



> This might help you:
> http://www.vboffice.net/en/developers/send-emails-automatically

> > Best regards
> Michael Bauer
> Category Manager -

> SAM - The Sending Account Manager:
>

> 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.

> .
>
 
C

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 " wrote:



> This might help you:
> http://www.vboffice.net/en/developers/send-emails-automatically

> > Best regards
> Michael Bauer
> Category Manager -

> SAM - The Sending Account Manager:
>

> 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

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
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

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 " wrote:
>
>

>
>> This might help you:
> > http://www.vboffice.net/en/developers/send-emails-automatically
>

>> > > Best regards
> > Michael Bauer
> > Category Manager -

> > SAM - The Sending Account Manager:
> >

>
>
>> 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.

> > .
> >
 
D

Diplodok

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
 
D

Diplodok

Forgot!

It tested on Outlook 2003, not 2007

But it used not specific VB model, I hope

Andrey
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
T Outlook creates a copie of every mail I send Using Outlook.com accounts in Outlook 4
M Outlook, send to > mail recipient - results in plain text email Using Outlook 1
S Outlook Macro to send auto acknowledge mail only to new mails received to a specific shared inbox Outlook VBA and Custom Forms 0
soadfan Outlook won't send e-mail when offline Outlook VBA and Custom Forms 19
K Delay Send and Mail Merge Outlook VBA and Custom Forms 4
undercover_smother Automatically Forward All Sent Mail and Delete After Send Outlook VBA and Custom Forms 10
stephen li VBA Outlook send mail automatically by specified outlook mail box Outlook VBA and Custom Forms 1
I Outlook 2013 Send mail - it just sticks in Outbox Using Outlook.com accounts in Outlook 0
Tim King Send mail from MSWord through Outlook Using Outlook 3
R OL2010 - Send to Mail Recipient going to wrong account Using Outlook 1
R Unable to send mail using Cox.net Using Outlook 1
Emerogork How do I activate the "Send Again" option in Sent Mail folder? Using Outlook 1
S Check if two organisition is added then i have to give managers passward creteria to send mail Using Outlook 1
A Application_ItemSend not accessed when sending email outside outlook (i.e. word or send to mail from Using Outlook 7
D VBA Script (Ask to where to save send mail) Outlook VBA and Custom Forms 1
D Create additional custom flag descriptions (other than Send E-Mail, Call etc.) Using Outlook 1
A yahoo mail doesn't send or receive reliably Using Outlook 1
Z Send mail and contents of body from ms word document Using Outlook 1
H Outlook 2010 unable to send iCloud account e-mail after iOS 7 upgrade Using Outlook 12
C Insert a Date Picker for Send Mail Subject Using Outlook 1
C MsgBox Everytime I send a mail Using Outlook 1
L "sometimes" cant send mail, we have to copy and paste the message and resend? Using Outlook 2
K A program is trying to send an e-mail message on your behalf... Using Outlook 1
L Send E-mail with VBA code from [E-mail Distribution Group] if I have “Send as” Using Outlook 6
S Outllok 2007 VBA code to send mail automatically from drafts folder Using Outlook 1
A How to send Personalized attachment while sending mass mail Using Outlook 1
G Rule: IF mail received by X, THEN no action; IF mail not received by X, SEND Using Outlook 0
E Outlook cannot connect to your incoming (POP3) e-mail server/Cannot send mess. Using Outlook 0
T HELP - Send e-mail verification text box Using Outlook.com accounts in Outlook 10
B How do I create and send mail in Outlook 2003 from code? Using Outlook 5
J Outlook 2003 does not send or receive imap mail from server Using Outlook 0
R OL10 - Send To "Mail Recipient" doesn't go to default email account Using Outlook 23
O Send Mail Via Outlook Even If Outlook Is Closed Using Outlook 4
D How can I send a group email to a color catagory re: yellow= mail BCM (Business Contact Manager) 1
T Get rid of having to type verification characters to send mail BCM (Business Contact Manager) 2
H how to send a e-mail with a annex automaticly Outlook VBA and Custom Forms 3
O Scheduled Task Fails running Code to send Outlook Mail from Excel. Outlook VBA and Custom Forms 9
D Outlook 2007 Will Not Send Mail From C# Application Outlook VBA and Custom Forms 7
P Move mail item after send Outlook VBA and Custom Forms 2
G Send Mail If Statement Outlook VBA and Custom Forms 4
Q Error code appears when I try to send e mail Using Outlook 2
S Reading mailitem after mail is send give runtime error. Outlook VBA and Custom Forms 1
Geldner Tweak Junk Email Reporting tool to default to particular email on send? Using Outlook 3
Geldner Send / Receive a particular group via macro or single keypress Using Outlook 1
E Outlook - Macro - send list of Tasks which are not finished Outlook VBA and Custom Forms 3
L How to avoid issues with "Send on Behalf" Using Outlook 3
M Outlook 365 refuses to send email Using Outlook 1
A Change settings Send/receive VBA Outlook VBA and Custom Forms 0
M I cant send emails via Outlook in my W10 PC. Using Outlook 3
K Run a script rule to auto 'send again' on undeliverable emails? Outlook VBA and Custom Forms 1

Similar threads

Top