Thread: e-mail issue
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JT JT is offline
external usenet poster
 
Posts: 234
Default e-mail issue

I'm using the code below to send e-mails to different cost centers. With
this code, the user will get the Outlook security message and they have to
click "ok" to send the message. This is okay because there may be situations
where they will not want to send the message.

The part I'm having trouble with is when they click "no" to not send the
e-mail. I'm looking for suggestions on how to close the e-mail being
displayed and move to the next record.

Thanks for your help....


Do Until eNumb BrNum

vHTMLString = "<HTML<BODY" _
& "<font face=Arial" _
& "<font size=3" _
& "Branch: " & EMdata1(eNumb) _
& "<br Date: " & EMdata2(eNumb) _
& "<br Deposit: " & EMdata3(eNumb) _
& "<br Days Outstanding: " & EMdata4(eNumb) _
& "<br Balance: " & EMdata5(eNumb) & "<br" _
& eMsg

With myitem

For OthNum = 1 To UBound(Addrdata1)
If Addrdata1(OthNum) = EMdata1(eNumb) Then
.To = Addrdata2(OthNum)
Exit For
End If
Next

.Subject = SubjectLine
.HTMLBody = vHTMLString
.Display
.Send

End With

--
JT