J'ai 2 bals ouvertes dans outlook. Je voudrais faire une recherche dans les
inbox des 2 bals.
J'arrive bien à le faire pour la bal par defaut, celle lié au profil par
contre la seconde, je n'y arrive pas.
Quelqu'un aurait une solution ?
mon script vba :
Public Sub Mail()
Set app = CreateObject("Outlook.Application")
Set ns = app.GetNamespace("MAPI")
Set folder = ns.GetDefaultFolder(olFolderInbox)
Set msgs = folder.Items
For Each msg In msgs
myText = msg.Body
If InStr(myText, "toto") Then MsgBox (myText)
Next
End Sub
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Thierry DEMAN [MVP]
Bonjour,
le plus est simple est d'ouvrir un 2ème profil MAPI/outlook se connectant uniquement à la 2ème BAL. En programmation, on peut ouvrir plusieurs boîtes/profils sans problème.
A+ -- Thierry DEMAN-BARCELÒ MVP Exchange, SQL/Server MCSE2003+M+S,MCSE+I,MCDBA,MCTS,MCITP http://base.faqexchange.info http://www.faqexchange.info "truc" wrote in message news:
Bonjour
J'ai 2 bals ouvertes dans outlook. Je voudrais faire une recherche dans les inbox des 2 bals. J'arrive bien à le faire pour la bal par defaut, celle lié au profil par contre la seconde, je n'y arrive pas.
Quelqu'un aurait une solution ?
mon script vba : Public Sub Mail() Set app = CreateObject("Outlook.Application") Set ns = app.GetNamespace("MAPI") Set folder = ns.GetDefaultFolder(olFolderInbox) Set msgs = folder.Items For Each msg In msgs myText = msg.Body If InStr(myText, "toto") Then MsgBox (myText) Next End Sub
merci
Bonjour,
le plus est simple est d'ouvrir un 2ème profil MAPI/outlook se connectant
uniquement à la 2ème BAL.
En programmation, on peut ouvrir plusieurs boîtes/profils sans problème.
A+
--
Thierry DEMAN-BARCELÒ
MVP Exchange, SQL/Server
MCSE2003+M+S,MCSE+I,MCDBA,MCTS,MCITP
http://base.faqexchange.info
http://www.faqexchange.info
"truc" <truc@discussions.microsoft.com> wrote in message
news:948F9DC4-EE3D-4FFD-BBD7-8FB59E3AFB3C@microsoft.com...
Bonjour
J'ai 2 bals ouvertes dans outlook. Je voudrais faire une recherche dans
les
inbox des 2 bals.
J'arrive bien à le faire pour la bal par defaut, celle lié au profil par
contre la seconde, je n'y arrive pas.
Quelqu'un aurait une solution ?
mon script vba :
Public Sub Mail()
Set app = CreateObject("Outlook.Application")
Set ns = app.GetNamespace("MAPI")
Set folder = ns.GetDefaultFolder(olFolderInbox)
Set msgs = folder.Items
For Each msg In msgs
myText = msg.Body
If InStr(myText, "toto") Then MsgBox (myText)
Next
End Sub
le plus est simple est d'ouvrir un 2ème profil MAPI/outlook se connectant uniquement à la 2ème BAL. En programmation, on peut ouvrir plusieurs boîtes/profils sans problème.
A+ -- Thierry DEMAN-BARCELÒ MVP Exchange, SQL/Server MCSE2003+M+S,MCSE+I,MCDBA,MCTS,MCITP http://base.faqexchange.info http://www.faqexchange.info "truc" wrote in message news:
Bonjour
J'ai 2 bals ouvertes dans outlook. Je voudrais faire une recherche dans les inbox des 2 bals. J'arrive bien à le faire pour la bal par defaut, celle lié au profil par contre la seconde, je n'y arrive pas.
Quelqu'un aurait une solution ?
mon script vba : Public Sub Mail() Set app = CreateObject("Outlook.Application") Set ns = app.GetNamespace("MAPI") Set folder = ns.GetDefaultFolder(olFolderInbox) Set msgs = folder.Items For Each msg In msgs myText = msg.Body If InStr(myText, "toto") Then MsgBox (myText) Next End Sub