ich habe folgendes Problem, ich lasse mir via Excel einen Outlook Termin erstellen.
In diesem Termin möchte ich als Body die Tabelle eines Arbeitsblattes haben Range("A1:J29")
Das komische ist es funktioniert nur wenn ich einen "Haltepunkt" im VBA Code setzte bei Set apptOutApp = Nothing
wenn der Haltepunkt nicht da ist, fügt er mir in den Terminbody auch nichts ein....
Sämtliche versuche mit Application.Wait etc schlugen fehl.
Hat jemand vielleicht noch eine andere Idee?
Option Explicit
Option Private Module
Public Function OutlookTermin(outDate As String, outStartTime As String, outDauer As Integer, _
outSubject As String, rng As Range, outlocation As String, Categories As String) As Boolean
Dim OutApp As Object, apptOutApp As Object
rng.Copy
Set OutApp = CreateObject("Outlook.Application")
Set apptOutApp = OutApp.CreateItem(1)
With apptOutApp
.Start = Format(outDate, "dd.mm.yyyy") & " " & Format(outStartTime, "hh:mm")
.Subject = outSubject
.Location = outlocation
.Duration = outDauer
.Body = ""
.ReminderMinutesBeforeStart = 1440
.ReminderPlaySound = True
.ReminderSet = True
.Categories = Categories
.Display
End With
SendKeys "^v", True
Call KeyOn
Set apptOutApp = Nothing
Set OutApp = Nothing
End Function
Vielen Dank und schönes WochenendeBleibt gesund, Curly