Body einer Email
25.01.2004 19:27:28
Martina
bei untenstehendem Code habe ich das Problem, das der Email-Body lediglich immer nur eine Zelle sein kann - Sprich Cells(1) im Zeitkonto...
Ich würde aber gerne als Body der späteren Mail das komplette Sheet von A1:H17 übernehmen.
Geht das irgendwie ?
Vielen lieben Dank für Eure Hilfe
Private Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" (ByVal hWnd As Long, _
ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Private Sub Mail(sAdr As String, Optional sSub As String, _
Optional sBody As String)
Call ShellExecute(0&, "Open", "mailto:" + sAdr + _
"?Subject=" + sSub + "&Body=" + sBody, "", "", 1)
End Sub
Sub MailVersenden()
Dim sAddress As String, sSubject As String, sTxt As String
sAddress = Sheets("Jahresplan").Range("A1").Value
sSubject = Sheets("Jahresplan").Range("B1").Value
sTxt = _
Sheets("Zeitkonto").Cells(1).Value
'HIER SITZT DAS PROBLEM'
Call Mail(sAddress, sSubject, sTxt)
End Sub