C
Christy
Can anyone tell me where I am going wrong here. I get
errors on the .To line and the .AddAttachment line
(doesn't like the variables I guess) I also get an error
on the Kill line.
For i = 1 To k
'get the address of the intended receipient
name = Cells(rnum + i, 3).Value
& "@email.usps.gov"
Debug.Print name
' get the name of the file to attach
aname = Cells(2, 4).Value & Cells(rnum + i,
8) & ".rft"
Debug.Print aname
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
With iMsg
Set .configuration = iConf
.To = "name"
.From = "(e-mail address removed)"
.Subject = "WEEKLY FLASH REPORT"
.Textbody = Cells(rnum + 1, 6).Value & vbNewLine
& "Please forward your comments/changes to Dan Sorenson
or Gary Bilyk."
.AddAttachment = "aname"
.Send
End With
Kill "aname"
Next i
Thanks
Christy
errors on the .To line and the .AddAttachment line
(doesn't like the variables I guess) I also get an error
on the Kill line.
For i = 1 To k
'get the address of the intended receipient
name = Cells(rnum + i, 3).Value
& "@email.usps.gov"
Debug.Print name
' get the name of the file to attach
aname = Cells(2, 4).Value & Cells(rnum + i,
8) & ".rft"
Debug.Print aname
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
With iMsg
Set .configuration = iConf
.To = "name"
.From = "(e-mail address removed)"
.Subject = "WEEKLY FLASH REPORT"
.Textbody = Cells(rnum + 1, 6).Value & vbNewLine
& "Please forward your comments/changes to Dan Sorenson
or Gary Bilyk."
.AddAttachment = "aname"
.Send
End With
Kill "aname"
Next i
Thanks
Christy