1
매크로를 실행하고 이름과 메일 주소를 잘 다듬었지만 다른 줄에 표시되도록 보낸 텍스트를 가져올 수 없다면 긴 줄의 텍스트로 나타납니다. 나는 vbline 등을 추가하는 시도하지만 하위 mailtoo()에 차이이메일에서 별도의 줄에 엑셀 텍스트
을하지
Dim OutApp As Object
Dim OutMail As Object
Dim cell As Range
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
On Error GoTo cleanup
For Each cell In Columns("b").Cells.SpecialCells(xlCellTypeConstants)
If cell.Value Like "?*@?*.?*" And _
LCase(Cells(cell.Row, "c").Value) = "yes" Then
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = cell.Value
.Subject = "for Action"
.Body = "Dear " & Cells(cell.Row, "A").Value _
& vbNewLine & vbNewLine & _
"line one of text here. " & _
"line two of text here" & _
"line three of text here" & _
"Regards" & _
"your name"
.Attachments.Add "C:\demofilename.xlsx"
.Send 'Or use Display
End With
On Error GoTo 0
Set OutMail = Nothing
End If
Next cell
정리 :
Set OutApp = Nothing
Application.ScreenUpdating = True
최종 하위 당신은 그 VbNewLine
변수의 사용을 만들 필요가
가 치료 환호를 작동 –