Einfügen eines formatierten Excel-Bereichs in eine Outlook-Nachricht

Ich verwende Office 2007 und möchte VBA verwenden, um einen Bereich formatierter Excel-Zellen in eine Outlook-Nachricht einzufügen und die Nachricht dann zu versenden. Im folgenden Code (den ich aus verschiedenen Quellen gehoben habe) läuft er fehlerfrei und sendet dann eine leere Nachricht ... das Einfügen funktioniert nicht.

Kann jemand das Problem erkennen und noch besser mit einer Lösung helfen?

Danke, -Steph

Sub SendMessage(SubjectText As String, Importance As OlImportance)
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment
Dim iAddr As Integer, Col As Integer, SendLink As Boolean
'Dim Doc As Word.Document, wdRn As Word.Range
Dim Doc As Object, wdRn As Object

' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")
' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

Set Doc = objOutlookMsg.GetInspector.WordEditor
'Set Doc = objOutlookMsg.ActiveInspector.WordEditor
Set wdRn = Doc.Range
wdRn.Paste

Set objOutlookRecip = objOutlookMsg.Recipients.Add("[email protected]")
objOutlookRecip.Type = 1
objOutlookMsg.Subject = SubjectText
objOutlookMsg.Importance = Importance

With objOutlookMsg
    For Each objOutlookRecip In .Recipients
        objOutlookRecip.Resolve
        ' Set the Subject, Body, and Importance of the message.
        '.Subject = "Coverage Requests"
        'objDrafts.GetFromClipboard
    Next
    .Send
End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
End Sub

Antworten auf die Frage(3)

Ihre Antwort auf die Frage