0
我在Excel VBA中有一些代碼。我需要通過電子郵件發送。它看起來很好,但沒有收到電子郵件。有人能幫我嗎?發送Excel VBA電子郵件
i = 4
Do While Sheets("Data").Cells(i, 1).Value <> ""
If Sheets("Data").Cells(i, 11).Value = "Pabaigtas" And Sheets("Data").Cells(i, 12).Value = "NE" And Sheets("Data").Cells(i, 10).Value <> "DONE" Then
Sheets("Email").Range("A2:P2").ClearContents
Sheets("Data").Range(Cells(i, 1), Cells(i, 16)).Copy
Sheets("Email").Range("A2:P2").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Sheets("Data").Cells(i, 10).Value = "DONE"
Sheets("Email").Activate
ActiveSheet.Range("A1:P2").Select
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = "NEATITIKIMU REGISTRAS"
.Item.To = "[email protected]" & ";" & "[email protected]" & ";" & "[email protected]" & ";" & "[email protected]" & ";" & "[email protected]" & ";" & "[email protected]" & ";" & "[email protected]" & ";" & "[email protected]" & ";" & "[email protected]" & ";" & "[email protected]"
.Item.Subject = "PABAIGTA UZDUOTIS NEATITIKIMU REGISTRE"
.Item.Send
End With
ActiveWorkbook.EnvelopeVisible = False
End If
i = i + 1
Loop
爲MS Outlook的標準電子郵件客戶端?你的Excel和Outlook的版本是什麼? – Luuklag