Thema Datum  Von Nutzer Rating
Antwort
29.12.2022 13:22:09 tolo
NotSolved
29.12.2022 13:37:12 Gast6024
NotSolved
29.12.2022 13:55:23 tolo
NotSolved
29.12.2022 17:00:02 Gast51342
NotSolved
30.12.2022 08:37:03 tolo
NotSolved
30.12.2022 13:53:13 Gast51763
NotSolved
30.12.2022 18:03:23 tolo
NotSolved
30.12.2022 20:50:25 Gast84279
NotSolved
Rot Öffnen eines Kalenderelements verhindern
30.12.2022 23:53:23 Gast84279
Solved
31.12.2022 11:23:14 tolo
Solved
31.12.2022 13:25:08 Gast84279
Solved

Ansicht des Beitrags:
Von:
Gast84279
Datum:
30.12.2022 23:53:23
Views:
501
Rating: Antwort:
 Nein
Thema:
Öffnen eines Kalenderelements verhindern

Hallo,

okidoki sähe dann so die Richtung aus...smiley

In Dein ThisOutlookSession Modul mit dem Event:

Option Explicit

Private WithEvents objInspectors As Outlook.Inspectors

Private Sub Application_Quit()
Set objInspectors = Nothing
End Sub

Private Sub Application_Startup()
Set objInspectors = Application.Inspectors
End Sub

Private Sub objInspectors_NewInspector(ByVal Inspector As Inspector)
'....
     
         If Antwort = vbYes Then
                Edit_Termin   'Mokro zur Bearbeitung des termins
                Call StartTimer(probjInspector:=Inspector)  '//<-----hier der Timer-Call.....
         End If
 
'....
End Sub

Dann in ein Standard-/Allg. Modul (Einfügen >>> Modul):

Option Explicit
Option Private Module

Private Declare Function FindWindowA Lib "user32.dll" ( _
    ByVal lpClassName As String, _
    ByVal lpWindowName As String) As Long
Private Declare Function SetTimer Lib "user32.dll" ( _
    ByVal hWnd As Long, _
    ByVal nIDEvent As Long, _
    ByVal uElapse As Long, _
    ByVal lpTimer As Long) As Long
Private Declare Function KillTimer Lib "user32.dll" ( _
    ByVal hWnd As Long, _
    ByVal nIDEvent As Long) As Long

Private Const GC_CLASSNAMEMSOUTLOOK As String = "rctrl_renwnd32"

Private llngHwnd As Long
Private lobjInspector As Inspector

Public Sub StartTimer(ByRef probjInspector As Inspector)
llngHwnd = FindWindowA(GC_CLASSNAMEMSOUTLOOK, vbNullString)
If llngHwnd <> 0 Then
    Set lobjInspector = probjInspector
    Call SetTimer(llngHwnd, 0&, 5&, AddressOf TimerProc)
End If
End Sub

Private Sub StopTimer()
Call KillTimer(llngHwnd, 0&)
llngHwnd = 0
End Sub

Private Sub TimerProc(ByVal hWnd As Long, _
    ByVal nIDEvent As Long, _
    ByVal uElapse As Long, _
    ByVal lpTimer As Long)
Call StopTimer
If Not lobjInspector Is Nothing Then
    Call lobjInspector.Close(olDiscard) '//<----hier Dein Schließenvorgang   '// ggf olSave
    Set lobjInspector = Nothing
End If
End Sub

Gruß,


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
29.12.2022 13:22:09 tolo
NotSolved
29.12.2022 13:37:12 Gast6024
NotSolved
29.12.2022 13:55:23 tolo
NotSolved
29.12.2022 17:00:02 Gast51342
NotSolved
30.12.2022 08:37:03 tolo
NotSolved
30.12.2022 13:53:13 Gast51763
NotSolved
30.12.2022 18:03:23 tolo
NotSolved
30.12.2022 20:50:25 Gast84279
NotSolved
Rot Öffnen eines Kalenderelements verhindern
30.12.2022 23:53:23 Gast84279
Solved
31.12.2022 11:23:14 tolo
Solved
31.12.2022 13:25:08 Gast84279
Solved