I need a little help with the code below. Here's what it does.
Loops through an excel till it detects an empty cell
name is column 6
receipent's email is column 16
personalized body is column 12
for testing purposes, i dare not email out column 16, so i use dummy accounts there.
The script below runs well and sends out the first email, goes to row 2, excel's window focused, the a popup appears saying "' not appropriate" (note the single quote at the beginning).
Any idea?
Mine is still an evaluation copy, is sending out one email, it's limitation?
Regards,
David.
Code: Select all
Let>filename=C:\pvbv.xls
IfFileExists>filename
ExecuteFile>filename
WaitWindowOpen>Microsoft Excel*
'
' go to first cell
'
press ctrl
wait>1
press home
wait>1
Release ctrl
Let>r=1
Let>recordlen=5
'
' email purposes
'
'Let>SMTP_AUTH=1
Let>SMTP_PORT=26
'
' loop till empty cell
'
Repeat>recordlen
DDERequest>Excel,filename,R%r%C12,bvpvmsg,60
DDERequest>Excel,filename,R%r%C16,bvpvemail,60
DDERequest>Excel,filename,R%r%C6,bvpvname,60
Let>[email protected];[email protected]
Let>subject=PV BV Email For %bvpvname%
Let>body=bvpvmsg
SMTPSendMail>recipients,server,[email protected],David,subject,body,
'Message>Result of SendMail: %SMTP_RESULT%
Wait>5
SetFocus>Microsoft Excel*
WaitWindowOpen>Microsoft Excel*
press down
wait>0.5
DDERequest>Excel,filename,R%r%C1,record,60
Length>record,recordlen
Let>r=r+1
until>recordlen=2 'empty cell