Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.excel.programming > #108453

Excel automatic mail (Gmail), with conditions (verify cell content)

Path csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.newsgroupbanter.com!news.newsgroupbanter.com.POSTED!not-for-mail
NNTP-Posting-Date Fri, 22 Jan 2016 06:49:01 -0600
From Lionelus <Lionelus.10e7dab8@excelbanter.com>
Newsgroups microsoft.public.excel.programming
Subject Excel automatic mail (Gmail), with conditions (verify cell content)
Date Fri, 22 Jan 2016 12:05:56 +0000
Message-ID <Lionelus.10e7dab8@excelbanter.com> (permalink)
Organization ExcelBanter.com
User-Agent
X-Newsreader
X-Originating-IP
Lines 73
X-Usenet-Provider http://www.giganews.com
X-Trace sv3-jqxeyH9GQQJRvqp1VYakRc/1OndT4zFhjKu8IB8L6x5awD5Mwm8cBIJVQsnTBr2KhUXxdK6MOU/04SD!Z4EEmT8B/eo5FQJlBIMMZhR2sbC65OMcptcny0/NPPH8fgmd6V6LINWhX/e4yVXL9ZxlBJeNrH3u!okXAPNPjCQ==
X-Complaints-To abuse@newsgroupbanter.com
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Lines 55
X-Original-Bytes 2939
Xref csiph.com microsoft.public.excel.programming:108453

Show key headers only | View raw


Hello everybody

I would need some help for a tool I would like to create 

Here is the situation:

I'm working in a young company, producing movies in France. We got many
artists coming back and forth. Some artists have short renewable
fixed-term contract (2 weeks usually). As there are many artists, with
various contract duration, I have to track down when contracts are
almost finished. When a contract is almost over, I have to ask by mail
the artists if he still wants to work with us and I have to ask my boss
if he still wants to employ the artist.

I was doing this manually. But it was becoming tiring, and I know there
are tools to automate this.

So, I wrote a macro I found on the net, allowing me to send a template
mail by clicking button. 

Now I'm looking for a way to automate this. The macro would daily check
cells : if status in cells says ''contract almost finished", it would
send a personal mail to employee and boss.

I saw that it's possible with Windows scheduled tasks.

Here is the macro for the button i'm using now :

Sub Envoi_mail_renouvellement_Guillaume()

Dim config As CDO.Configuration
Dim email As CDO.Message

Set config = New CDO.Configuration
With config.Fields
Item(cdoSendUsingMethod) = cdoSendUsingPort
Item(cdoSMTPServer) = XX
Item(cdoSendUserName) = XX
Item(cdoSendPassword) = XX
Item(cdoSMTPServerPort) = XX
Update
End With

Set email = New CDO.Message
With email
Set .Configuration = config
From = XXX
To = XXX
Subject = "Studio Angoulême - Renouvellement contrat Guillaume
Gilbaud"
TextBody = "Salut xxx, le contrat de Guillaume arrive bientôt à
terme (fin le 30/04/2016). Quelle suite est prévue pour lui ? "
Send
End With

End Sub


I tried to add conditions and schedule the excel sheet as a task :

If Range("F" & iRow).Value <> "à renouveler ?" Then

but it doesn't work.

If somoene can help, I would be very grateful :)

Thanks




-- 
Lionelus

Back to microsoft.public.excel.programming | Previous | Next | Find similar | Unroll thread


Thread

Excel automatic mail (Gmail), with conditions (verify cell content) Lionelus <Lionelus.10e7dab8@excelbanter.com> - 2016-01-22 12:05 +0000

csiph-web