IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

VBA Outlook Discussion :

Vba outlook: Activation du gestionnaire d'absence du bureau


Sujet :

VBA Outlook

  1. #1
    Membre du Club
    Homme Profil pro
    Architecte technique
    Inscrit en
    Janvier 2015
    Messages
    197
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France

    Informations professionnelles :
    Activité : Architecte technique

    Informations forums :
    Inscription : Janvier 2015
    Messages : 197
    Points : 53
    Points
    53
    Par défaut Vba outlook: Activation du gestionnaire d'absence du bureau
    Bonjour,

    Existe-t-il une possibilité de paramétrer le gestionnaire d'absence du bureau via un un script svp ?

    Merci

  2. #2
    Expert éminent
    Avatar de Oliv-
    Homme Profil pro
    solution provider
    Inscrit en
    Mars 2006
    Messages
    4 087
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : solution provider

    Informations forums :
    Inscription : Mars 2006
    Messages : 4 087
    Points : 7 168
    Points
    7 168
    Billets dans le blog
    20
    Par défaut
    Bonjour,

    Tu peux essayer avec REDEMPTION : http://www.dimastr.com/redemption/RD...eAssistant.htm

    voici une autre méthode
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    Sub activeOOF()
     
        Dim olkIS As Object, olkPA As Object
        Const PR_OOF_STATE = "http://schemas.microsoft.com/mapi/proptag/0x661D000B"
     
        Dim oStore As Outlook.Store, oProp As Outlook.PropertyAccessor
        Dim oStorageItem As Outlook.StorageItem
     
        Set oStorageItem = Application.Session.GetDefaultFolder(olFolderInbox).GetStorage("IPM.Note.Rules.OofTemplate.Microsoft", olIdentifyByMessageClass)
        'Microsoft.Exchange.OOF.InternalSenders.Global
        Set oStorageItem = Application.Session.GetDefaultFolder(olFolderInbox).GetStorage("Microsoft.Exchange.OOF.InternalSenders.Global", olIdentifyByMessageClass)
     
        'Microsoft.Exchange.OOF.AllExternalSenders.Global
     
        oStorageItem.Body = "I am out of the office!"
        oStorageItem.Save
     
     
        For Each oStore In Session.Stores
            If oStore.ExchangeStoreType = olPrimaryExchangeMailbox Then
     
                Set oProp = oStore.PropertyAccessor
                oProp.SetProperty PR_OOF_STATE, True 'False pour désactiver
     
            End If
        Next
        Set olkIS = Nothing
        Set olkPA = Nothing
    End Sub
    Dans certains cas obscurs ces méthodes ne fonctionnent pas !

  3. #3
    Membre du Club
    Homme Profil pro
    Architecte technique
    Inscrit en
    Janvier 2015
    Messages
    197
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France

    Informations professionnelles :
    Activité : Architecte technique

    Informations forums :
    Inscription : Janvier 2015
    Messages : 197
    Points : 53
    Points
    53
    Par défaut
    Bonjour,

    Merci beaucoup Olivier et désolé pour le retard ;-)

  4. #4
    Expert éminent
    Avatar de Oliv-
    Homme Profil pro
    solution provider
    Inscrit en
    Mars 2006
    Messages
    4 087
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : solution provider

    Informations forums :
    Inscription : Mars 2006
    Messages : 4 087
    Points : 7 168
    Points
    7 168
    Billets dans le blog
    20
    Par défaut
    Salut,
    dis moi surtout si cela marche ? et si oui avec quelle solution ?

  5. #5
    Membre du Club
    Homme Profil pro
    Architecte technique
    Inscrit en
    Janvier 2015
    Messages
    197
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France

    Informations professionnelles :
    Activité : Architecte technique

    Informations forums :
    Inscription : Janvier 2015
    Messages : 197
    Points : 53
    Points
    53
    Par défaut
    Bonjour OLIVIER,

    ca marche avec ta deuxième méthode:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    Sub activeOOF(StrID As Outlook.MailItem)
     
        Dim olkIS As Object, olkPA As Object
        Const PR_OOF_STATE = "http://schemas.microsoft.com/mapi/proptag/0x661D000B"
     
        Dim oStore As Outlook.Store, oProp As Outlook.PropertyAccessor
        Dim oStorageItem As Outlook.StorageItem
     
        Set oStorageItem = Application.Session.GetDefaultFolder(olFolderInbox).GetStorage("IPM.Note.Rules.OofTemplate.Microsoft", olIdentifyByMessageClass)
        'Microsoft.Exchange.OOF.InternalSenders.Global
        Set oStorageItem = Application.Session.GetDefaultFolder(olFolderInbox).GetStorage("Microsoft.Exchange.OOF.InternalSenders.Global", olIdentifyByMessageClass)
     
        'Microsoft.Exchange.OOF.AllExternalSenders.Global
     
        oStorageItem.Body = "I am out of the office!"
        oStorageItem.Save
     
     
        For Each oStore In Session.Stores
            If oStore.ExchangeStoreType = olPrimaryExchangeMailbox Then
     
                Set oProp = oStore.PropertyAccessor
                oProp.SetProperty PR_OOF_STATE, True 'False pour désactiver
     
            End If
        Next
        Set olkIS = Nothing
        Set olkPA = Nothing
    End Sub
    Merci pour votre aide.

Discussions similaires

  1. [OL-2010] Gestionnaire d'absence du bureau
    Par pc75 dans le forum VBA Outlook
    Réponses: 2
    Dernier message: 24/12/2012, 09h38
  2. [OL-2007] Gestionnaire d'absence du bureau d'Outlook 2007
    Par infomig dans le forum Outlook
    Réponses: 0
    Dernier message: 19/11/2010, 07h37
  3. [OL-2010] Gestionnaire d'absence activé?
    Par Junior_jef dans le forum Outlook
    Réponses: 0
    Dernier message: 01/06/2010, 11h38
  4. Activer le gestionnaire d'absence
    Par slavovensky dans le forum VBA Outlook
    Réponses: 1
    Dernier message: 21/11/2008, 13h23
  5. Réponses: 1
    Dernier message: 06/08/2008, 09h51

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo