Thema Datum  Von Nutzer Rating
Antwort
Rot Excel Tabelle in Outlook
27.03.2023 14:10:21 Shelan
NotSolved

Ansicht des Beitrags:
Von:
Shelan
Datum:
27.03.2023 14:10:21
Views:
501
Rating: Antwort:
  Ja
Thema:
Excel Tabelle in Outlook

Hi, ich arbeite gerade daran eine Excel Tabelle per mail als VBA zu versende. Ich komme mit meiner Formel nicht weiter, da nur ein teil meiner Excel in Outlook angezeigt wird und bis zu einer bestimmten Spalte abgeschnitten wird. Kann mir da einer weiterhelfen?

Hier ist die Formel

Option Explicit


Sub CopyRangetoOutlook_single()

'Declare Outlook Variables
Dim oLookApp As Outlook.Application
Dim oLookItm As Outlook.MailItem
Dim olooksIns As Outlook.Inspector

'Declare Word Variables
Dim oWrdDoc As Word.Document
Dim oWrdRng As Word.Range

'Declae Excel Variables
Dim ExcRng As Range

On Error Resume Next

'Get the Active instance of Outlook
Set oLookApp = GetObject(, "Outlook.Application")

'If error create a new instance of Outlook
If Err.Number = 429 Then

'Clear Error
Err.Clear

'Create a new instance of Outlook
Set oLookApp = New Outlook.Application

End If

'Create a new email
Set oLookItm = oLookApp.CreateItem(olMailItem)

'Creeate a reference to the Excel Range that we want to export
Set ExcRng = Sheet3.Range("A1:AE74")

With oLookItm
'Define some basic information
.To = "email@web.de;" &
.CC = ""
.Subject = ""
.Body = "Hi"

'Display email
.Display

'Get the Active Inspector
Set olooksIns = .GetInspector

'Get the Word Editor
Set oWrdDoc = olooksIns.WordEditor

'Specify the range in the Document
Set oWrdRng = oWrdDoc.Application.ActiveDocument.Content
oWrdRng.Collapse Direction:=wdCollapseEnd




'Add a new paragraph and then insert a break

oWrdRng.InsertBreak

'Copy the Range
ExcRng.Copy

'Paste it
oWrdRng.PasteSpecial DataType:=wdPasteMetafilePicture



End With

End Sub


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
Rot Excel Tabelle in Outlook
27.03.2023 14:10:21 Shelan
NotSolved