title image


Smiley Re: Termin in Outlook automatisch anlegen ?
Das geht so:Public Function CreateOutlookAppointment(SDate, Optional EDate = "", Optional Subject = "", Optional Body = "") Dim myOlApp As Object, Tmp, I As Long, j As Long, aItm As AppointmentItem, myNameSpace As Object Dim myFolder As Object, UProp As Outlook.UserProperty, IsOpen As Boolean On Error Resume Next Set myOlApp = GetObject(, "Outlook.Application") IsOpen = False If Err = 0 Then IsOpen = True Else Err.Clear On Error GoTo Er Set myOlApp = CreateObject("Outlook.Application") End If On Error GoTo Er ' Neuen Termin anlegen Set aItm = myOlApp.CreateItem(olAppointmentItem) With aItm .Subject = Subject .Body = Body .Start = CDate(SDate) If EDate = "" Then .End = DateAdd("h", 1, .Start) Else .End = CDate(EDate) End If .Save End WithEx: On Error Resume Next Set myFolder = Nothing Set myNameSpace = Nothing If IsOpen Then Set myOlApp = Nothing Exit FunctionEr: MsgBox "CreateOutlookAppointment: " & Err & " " & Err.Description GoTo ExEnd FunctionVerweis auf Outlook-Objektbibliothek setzen!Reinhard


Gruß aus dem Norden
Reinhard


Bitte immer die Access-Version angeben!
DB-Wiki


Wie man Fragen richtig stellt

YaccessAccess-FAQUnd ansonsten: Wikipedia




geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: