best1
02-27-2007, 12:28 PM
Guys
having a real :banghead: moment here!
i have the code working below for sending out mass emails to a variety of cell value email addrsses, but i cant work out for the life of me how to paste from the clipboard instead of picking up the body text from a textbox on the userform... i know this is really stupid, but i am new to this game and would gratefully receive any help you might have!
here is code below - can i just replace the "& txtBodyText.Value" with a paste from clipboard instruction?!??!:
On Error Resume Next
With OutMail
.To = cell.Value
.Cc = txtCc.Value
.Bcc = txtBcc.Value
.Subject = txtSubject.Value
.Body = "Dear " & cell.Offset(0, -1).Value & vbNewLine & vbNewLine & txtBodyText.Value
.Attachments.Add attach1
.Attachments.Add attach2
.Attachments.Add attach3
.Attachments.Add attach4
.Attachments.Add attach5
.Attachments.Add attach6
If chbDisplayEmailOnly.Value = True Then
If MsgBox("You are about to create mass emails for the recipients listed. They will be displayed, not sent. Do you want to continue?", vbYesNo, _
"My Title") = vbNo Then Exit Sub
.Display
Else
If MsgBox("You are about to create and send mass emails for the recipients listed. Do you want to continue?", vbYesNo, _
"My Title") = vbNo Then Exit Sub
.Send
End If
Thanks to everyone!
best1
having a real :banghead: moment here!
i have the code working below for sending out mass emails to a variety of cell value email addrsses, but i cant work out for the life of me how to paste from the clipboard instead of picking up the body text from a textbox on the userform... i know this is really stupid, but i am new to this game and would gratefully receive any help you might have!
here is code below - can i just replace the "& txtBodyText.Value" with a paste from clipboard instruction?!??!:
On Error Resume Next
With OutMail
.To = cell.Value
.Cc = txtCc.Value
.Bcc = txtBcc.Value
.Subject = txtSubject.Value
.Body = "Dear " & cell.Offset(0, -1).Value & vbNewLine & vbNewLine & txtBodyText.Value
.Attachments.Add attach1
.Attachments.Add attach2
.Attachments.Add attach3
.Attachments.Add attach4
.Attachments.Add attach5
.Attachments.Add attach6
If chbDisplayEmailOnly.Value = True Then
If MsgBox("You are about to create mass emails for the recipients listed. They will be displayed, not sent. Do you want to continue?", vbYesNo, _
"My Title") = vbNo Then Exit Sub
.Display
Else
If MsgBox("You are about to create and send mass emails for the recipients listed. Do you want to continue?", vbYesNo, _
"My Title") = vbNo Then Exit Sub
.Send
End If
Thanks to everyone!
best1