Reste à m'inspirer du formulaire de Jean Luc pour bisouiller un userform
permettant de choisir le contact et d'incorporer son adresse dans excel.
Reste à m'inspirer du formulaire de Jean Luc pour bisouiller un userform
permettant de choisir le contact et d'incorporer son adresse dans excel.
Reste à m'inspirer du formulaire de Jean Luc pour bisouiller un userform
permettant de choisir le contact et d'incorporer son adresse dans excel.
| la macro de Denis rale sur
| Dim objApp As Outlook.Application
| ...Type non défini
Tu dois ajouter la bibliothèque "Microsoft Outlook x Librairy"
| la macro de Denis rale sur
| Dim objApp As Outlook.Application
| ...Type non défini
Tu dois ajouter la bibliothèque "Microsoft Outlook x Librairy"
| la macro de Denis rale sur
| Dim objApp As Outlook.Application
| ...Type non défini
Tu dois ajouter la bibliothèque "Microsoft Outlook x Librairy"
Coucou
Tout est dans le titre... Comment récupérer dans excel les adresses q ui
sont dans outlook ? J'ai cherché sur excelabo mais c'est un pur scandale
ça y est même pas !!!
idéalement ce serait bien d'y accéder via un menu déroulant.
Il ne s'agit PAS de faire du publipostage mais juste d'incorporer une
adresse dans une feuille excel.
Merci de votre aide ;-)
--
Misange migrateuse
XlWiki : Participez à un travail collaboratif sur excel !
http://xlwiki.free.fr/wiki
http://www.excelabo.net
Coucou
Tout est dans le titre... Comment récupérer dans excel les adresses q ui
sont dans outlook ? J'ai cherché sur excelabo mais c'est un pur scandale
ça y est même pas !!!
idéalement ce serait bien d'y accéder via un menu déroulant.
Il ne s'agit PAS de faire du publipostage mais juste d'incorporer une
adresse dans une feuille excel.
Merci de votre aide ;-)
--
Misange migrateuse
XlWiki : Participez à un travail collaboratif sur excel !
http://xlwiki.free.fr/wiki
http://www.excelabo.net
Coucou
Tout est dans le titre... Comment récupérer dans excel les adresses q ui
sont dans outlook ? J'ai cherché sur excelabo mais c'est un pur scandale
ça y est même pas !!!
idéalement ce serait bien d'y accéder via un menu déroulant.
Il ne s'agit PAS de faire du publipostage mais juste d'incorporer une
adresse dans une feuille excel.
Merci de votre aide ;-)
--
Misange migrateuse
XlWiki : Participez à un travail collaboratif sur excel !
http://xlwiki.free.fr/wiki
http://www.excelabo.net
Bonjour Misange,
Liste triée des contacts dans un formulaire:
Pour récupérer le formulaire dans un classeur Excel, utiiliser
Exporter/Importer formulaire.
http://cjoint.com/?lxfPfkbKKn
Private Sub UserForm_Initialize()
' Outils/Référence OutLook
Dim Tbl()
Dim olNS As Outlook.Namespace
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set Contacts = olNS.GetDefaultFolder(olFolderContacts)
Set LItems = Contacts.Items
n = 0
For Each i In LItems
ReDim Preserve Tbl(0 To 2, 0 To n)
Tbl(0, n) = i.FirstName
Tbl(1, n) = i.LastName
Tbl(2, n) = i.Email1Address
n = n + 1
Next
Tri Tbl()
Me.ListBox1.List = Application.Transpose(Tbl)
End Sub
Sub Tri(table())
xn = UBound(table, 2)
ecart = xn ' tri shell
Do While ecart >= 1
ecart = ecart 2
inv = True
Do While inv
inv = False
For i = 0 To xn - ecart
j = i + ecart
If table(0, j) < table(0, i) Then
temp = table(0, j): table(0, j) = table(0, i): table(0, i) > temp
temp = table(1, j): table(1, j) = table(1, i): table(1, i) > temp
temp = table(2, j): table(2, j) = table(2, i): table(2, i) > temp
inv = True
End If
Next
Loop
Loop
End Sub
Private Sub ListBox1_Click()
[A1] = ListBox1
[A2] = ListBox1.Column(1)
[A3] = ListBox1.Column(2)
End Sub
JBCoucou
Tout est dans le titre... Comment récupérer dans excel les adresses qui
sont dans outlook ? J'ai cherché sur excelabo mais c'est un pur scandale
ça y est même pas !!!
idéalement ce serait bien d'y accéder via un menu déroulant.
Il ne s'agit PAS de faire du publipostage mais juste d'incorporer une
adresse dans une feuille excel.
Merci de votre aide ;-)
--
Misange migrateuse
XlWiki : Participez à un travail collaboratif sur excel !
http://xlwiki.free.fr/wiki
http://www.excelabo.net
Bonjour Misange,
Liste triée des contacts dans un formulaire:
Pour récupérer le formulaire dans un classeur Excel, utiiliser
Exporter/Importer formulaire.
http://cjoint.com/?lxfPfkbKKn
Private Sub UserForm_Initialize()
' Outils/Référence OutLook
Dim Tbl()
Dim olNS As Outlook.Namespace
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set Contacts = olNS.GetDefaultFolder(olFolderContacts)
Set LItems = Contacts.Items
n = 0
For Each i In LItems
ReDim Preserve Tbl(0 To 2, 0 To n)
Tbl(0, n) = i.FirstName
Tbl(1, n) = i.LastName
Tbl(2, n) = i.Email1Address
n = n + 1
Next
Tri Tbl()
Me.ListBox1.List = Application.Transpose(Tbl)
End Sub
Sub Tri(table())
xn = UBound(table, 2)
ecart = xn ' tri shell
Do While ecart >= 1
ecart = ecart 2
inv = True
Do While inv
inv = False
For i = 0 To xn - ecart
j = i + ecart
If table(0, j) < table(0, i) Then
temp = table(0, j): table(0, j) = table(0, i): table(0, i) > temp
temp = table(1, j): table(1, j) = table(1, i): table(1, i) > temp
temp = table(2, j): table(2, j) = table(2, i): table(2, i) > temp
inv = True
End If
Next
Loop
Loop
End Sub
Private Sub ListBox1_Click()
[A1] = ListBox1
[A2] = ListBox1.Column(1)
[A3] = ListBox1.Column(2)
End Sub
JB
Coucou
Tout est dans le titre... Comment récupérer dans excel les adresses qui
sont dans outlook ? J'ai cherché sur excelabo mais c'est un pur scandale
ça y est même pas !!!
idéalement ce serait bien d'y accéder via un menu déroulant.
Il ne s'agit PAS de faire du publipostage mais juste d'incorporer une
adresse dans une feuille excel.
Merci de votre aide ;-)
--
Misange migrateuse
XlWiki : Participez à un travail collaboratif sur excel !
http://xlwiki.free.fr/wiki
http://www.excelabo.net
Bonjour Misange,
Liste triée des contacts dans un formulaire:
Pour récupérer le formulaire dans un classeur Excel, utiiliser
Exporter/Importer formulaire.
http://cjoint.com/?lxfPfkbKKn
Private Sub UserForm_Initialize()
' Outils/Référence OutLook
Dim Tbl()
Dim olNS As Outlook.Namespace
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set Contacts = olNS.GetDefaultFolder(olFolderContacts)
Set LItems = Contacts.Items
n = 0
For Each i In LItems
ReDim Preserve Tbl(0 To 2, 0 To n)
Tbl(0, n) = i.FirstName
Tbl(1, n) = i.LastName
Tbl(2, n) = i.Email1Address
n = n + 1
Next
Tri Tbl()
Me.ListBox1.List = Application.Transpose(Tbl)
End Sub
Sub Tri(table())
xn = UBound(table, 2)
ecart = xn ' tri shell
Do While ecart >= 1
ecart = ecart 2
inv = True
Do While inv
inv = False
For i = 0 To xn - ecart
j = i + ecart
If table(0, j) < table(0, i) Then
temp = table(0, j): table(0, j) = table(0, i): table(0, i) > temp
temp = table(1, j): table(1, j) = table(1, i): table(1, i) > temp
temp = table(2, j): table(2, j) = table(2, i): table(2, i) > temp
inv = True
End If
Next
Loop
Loop
End Sub
Private Sub ListBox1_Click()
[A1] = ListBox1
[A2] = ListBox1.Column(1)
[A3] = ListBox1.Column(2)
End Sub
JBCoucou
Tout est dans le titre... Comment récupérer dans excel les adresses qui
sont dans outlook ? J'ai cherché sur excelabo mais c'est un pur scandale
ça y est même pas !!!
idéalement ce serait bien d'y accéder via un menu déroulant.
Il ne s'agit PAS de faire du publipostage mais juste d'incorporer une
adresse dans une feuille excel.
Merci de votre aide ;-)
--
Misange migrateuse
XlWiki : Participez à un travail collaboratif sur excel !
http://xlwiki.free.fr/wiki
http://www.excelabo.net
*Bonjour JB*,
Ta petite appli m'a l'air interessante.
Pour utiliser ton code, il faut "Microsoft Outlook 11.0 Object Library"
Comme je n'ai que office 2000 (9.0), que faut il modifier pour
l'utiliser ?Bonjour Misange,
Liste triée des contacts dans un formulaire:
Pour récupérer le formulaire dans un classeur Excel, utiiliser
Exporter/Importer formulaire.
http://cjoint.com/?lxfPfkbKKn
Private Sub UserForm_Initialize()
' Outils/Référence OutLook
Dim Tbl()
Dim olNS As Outlook.Namespace
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set Contacts = olNS.GetDefaultFolder(olFolderContacts)
Set LItems = Contacts.Items
n = 0
For Each i In LItems
ReDim Preserve Tbl(0 To 2, 0 To n)
Tbl(0, n) = i.FirstName
Tbl(1, n) = i.LastName
Tbl(2, n) = i.Email1Address
n = n + 1
Next
Tri Tbl()
Me.ListBox1.List = Application.Transpose(Tbl)
End Sub
Sub Tri(table())
xn = UBound(table, 2)
ecart = xn ' tri shell
Do While ecart >= 1
ecart = ecart 2
inv = True
Do While inv
inv = False
For i = 0 To xn - ecart
j = i + ecart
If table(0, j) < table(0, i) Then
temp = table(0, j): table(0, j) = table(0, i): table(0, i) =
temp
temp = table(1, j): table(1, j) = table(1, i): table(1, i) =
temp
temp = table(2, j): table(2, j) = table(2, i): table(2, i) =
temp
inv = True
End If
Next
Loop
Loop
End Sub
Private Sub ListBox1_Click()
[A1] = ListBox1
[A2] = ListBox1.Column(1)
[A3] = ListBox1.Column(2)
End Sub
JBCoucou
Tout est dans le titre... Comment récupérer dans excel les adresse s qui
sont dans outlook ? J'ai cherché sur excelabo mais c'est un pur scan dale
ça y est même pas !!!
idéalement ce serait bien d'y accéder via un menu déroulant.
Il ne s'agit PAS de faire du publipostage mais juste d'incorporer une
adresse dans une feuille excel.
Merci de votre aide ;-)
--
Misange migrateuse
XlWiki : Participez à un travail collaboratif sur excel !
http://xlwiki.free.fr/wiki
http://www.excelabo.net
--
____
( O | O )
--
_oooO_ JLuc _Oooo_
O-O
*Bonjour JB*,
Ta petite appli m'a l'air interessante.
Pour utiliser ton code, il faut "Microsoft Outlook 11.0 Object Library"
Comme je n'ai que office 2000 (9.0), que faut il modifier pour
l'utiliser ?
Bonjour Misange,
Liste triée des contacts dans un formulaire:
Pour récupérer le formulaire dans un classeur Excel, utiiliser
Exporter/Importer formulaire.
http://cjoint.com/?lxfPfkbKKn
Private Sub UserForm_Initialize()
' Outils/Référence OutLook
Dim Tbl()
Dim olNS As Outlook.Namespace
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set Contacts = olNS.GetDefaultFolder(olFolderContacts)
Set LItems = Contacts.Items
n = 0
For Each i In LItems
ReDim Preserve Tbl(0 To 2, 0 To n)
Tbl(0, n) = i.FirstName
Tbl(1, n) = i.LastName
Tbl(2, n) = i.Email1Address
n = n + 1
Next
Tri Tbl()
Me.ListBox1.List = Application.Transpose(Tbl)
End Sub
Sub Tri(table())
xn = UBound(table, 2)
ecart = xn ' tri shell
Do While ecart >= 1
ecart = ecart 2
inv = True
Do While inv
inv = False
For i = 0 To xn - ecart
j = i + ecart
If table(0, j) < table(0, i) Then
temp = table(0, j): table(0, j) = table(0, i): table(0, i) =
temp
temp = table(1, j): table(1, j) = table(1, i): table(1, i) =
temp
temp = table(2, j): table(2, j) = table(2, i): table(2, i) =
temp
inv = True
End If
Next
Loop
Loop
End Sub
Private Sub ListBox1_Click()
[A1] = ListBox1
[A2] = ListBox1.Column(1)
[A3] = ListBox1.Column(2)
End Sub
JB
Coucou
Tout est dans le titre... Comment récupérer dans excel les adresse s qui
sont dans outlook ? J'ai cherché sur excelabo mais c'est un pur scan dale
ça y est même pas !!!
idéalement ce serait bien d'y accéder via un menu déroulant.
Il ne s'agit PAS de faire du publipostage mais juste d'incorporer une
adresse dans une feuille excel.
Merci de votre aide ;-)
--
Misange migrateuse
XlWiki : Participez à un travail collaboratif sur excel !
http://xlwiki.free.fr/wiki
http://www.excelabo.net
--
____
( O | O )
--
_oooO_ JLuc _Oooo_
O-O
*Bonjour JB*,
Ta petite appli m'a l'air interessante.
Pour utiliser ton code, il faut "Microsoft Outlook 11.0 Object Library"
Comme je n'ai que office 2000 (9.0), que faut il modifier pour
l'utiliser ?Bonjour Misange,
Liste triée des contacts dans un formulaire:
Pour récupérer le formulaire dans un classeur Excel, utiiliser
Exporter/Importer formulaire.
http://cjoint.com/?lxfPfkbKKn
Private Sub UserForm_Initialize()
' Outils/Référence OutLook
Dim Tbl()
Dim olNS As Outlook.Namespace
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set Contacts = olNS.GetDefaultFolder(olFolderContacts)
Set LItems = Contacts.Items
n = 0
For Each i In LItems
ReDim Preserve Tbl(0 To 2, 0 To n)
Tbl(0, n) = i.FirstName
Tbl(1, n) = i.LastName
Tbl(2, n) = i.Email1Address
n = n + 1
Next
Tri Tbl()
Me.ListBox1.List = Application.Transpose(Tbl)
End Sub
Sub Tri(table())
xn = UBound(table, 2)
ecart = xn ' tri shell
Do While ecart >= 1
ecart = ecart 2
inv = True
Do While inv
inv = False
For i = 0 To xn - ecart
j = i + ecart
If table(0, j) < table(0, i) Then
temp = table(0, j): table(0, j) = table(0, i): table(0, i) =
temp
temp = table(1, j): table(1, j) = table(1, i): table(1, i) =
temp
temp = table(2, j): table(2, j) = table(2, i): table(2, i) =
temp
inv = True
End If
Next
Loop
Loop
End Sub
Private Sub ListBox1_Click()
[A1] = ListBox1
[A2] = ListBox1.Column(1)
[A3] = ListBox1.Column(2)
End Sub
JBCoucou
Tout est dans le titre... Comment récupérer dans excel les adresse s qui
sont dans outlook ? J'ai cherché sur excelabo mais c'est un pur scan dale
ça y est même pas !!!
idéalement ce serait bien d'y accéder via un menu déroulant.
Il ne s'agit PAS de faire du publipostage mais juste d'incorporer une
adresse dans une feuille excel.
Merci de votre aide ;-)
--
Misange migrateuse
XlWiki : Participez à un travail collaboratif sur excel !
http://xlwiki.free.fr/wiki
http://www.excelabo.net
--
____
( O | O )
--
_oooO_ JLuc _Oooo_
O-O
Bonjour Misange,
Liste triée des contacts dans un formulaire:
Pour récupérer le formulaire dans un classeur Excel, utiiliser
Exporter/Importer formulaire.
http://cjoint.com/?lxfPfkbKKn
Private Sub UserForm_Initialize()
' Outils/Référence OutLook
Dim Tbl()
Dim olNS As Outlook.Namespace
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set Contacts = olNS.GetDefaultFolder(olFolderContacts)
Set LItems = Contacts.Items
n = 0
For Each i In LItems
ReDim Preserve Tbl(0 To 2, 0 To n)
Tbl(0, n) = i.FirstName
Tbl(1, n) = i.LastName
Tbl(2, n) = i.Email1Address
n = n + 1
Next
Tri Tbl()
Me.ListBox1.List = Application.Transpose(Tbl)
End Sub
Sub Tri(table())
xn = UBound(table, 2)
ecart = xn ' tri shell
Do While ecart >= 1
ecart = ecart 2
inv = True
Do While inv
inv = False
For i = 0 To xn - ecart
j = i + ecart
If table(0, j) < table(0, i) Then
temp = table(0, j): table(0, j) = table(0, i): table(0, i) > temp
temp = table(1, j): table(1, j) = table(1, i): table(1, i) > temp
temp = table(2, j): table(2, j) = table(2, i): table(2, i) > temp
inv = True
End If
Next
Loop
Loop
End Sub
Private Sub ListBox1_Click()
[A1] = ListBox1
[A2] = ListBox1.Column(1)
[A3] = ListBox1.Column(2)
End Sub
JBCoucou
Tout est dans le titre... Comment récupérer dans excel les adresses qui
sont dans outlook ? J'ai cherché sur excelabo mais c'est un pur scandale
ça y est même pas !!!
idéalement ce serait bien d'y accéder via un menu déroulant.
Il ne s'agit PAS de faire du publipostage mais juste d'incorporer une
adresse dans une feuille excel.
Merci de votre aide ;-)
--
Misange migrateuse
XlWiki : Participez à un travail collaboratif sur excel !
http://xlwiki.free.fr/wiki
http://www.excelabo.net
Bonjour Misange,
Liste triée des contacts dans un formulaire:
Pour récupérer le formulaire dans un classeur Excel, utiiliser
Exporter/Importer formulaire.
http://cjoint.com/?lxfPfkbKKn
Private Sub UserForm_Initialize()
' Outils/Référence OutLook
Dim Tbl()
Dim olNS As Outlook.Namespace
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set Contacts = olNS.GetDefaultFolder(olFolderContacts)
Set LItems = Contacts.Items
n = 0
For Each i In LItems
ReDim Preserve Tbl(0 To 2, 0 To n)
Tbl(0, n) = i.FirstName
Tbl(1, n) = i.LastName
Tbl(2, n) = i.Email1Address
n = n + 1
Next
Tri Tbl()
Me.ListBox1.List = Application.Transpose(Tbl)
End Sub
Sub Tri(table())
xn = UBound(table, 2)
ecart = xn ' tri shell
Do While ecart >= 1
ecart = ecart 2
inv = True
Do While inv
inv = False
For i = 0 To xn - ecart
j = i + ecart
If table(0, j) < table(0, i) Then
temp = table(0, j): table(0, j) = table(0, i): table(0, i) > temp
temp = table(1, j): table(1, j) = table(1, i): table(1, i) > temp
temp = table(2, j): table(2, j) = table(2, i): table(2, i) > temp
inv = True
End If
Next
Loop
Loop
End Sub
Private Sub ListBox1_Click()
[A1] = ListBox1
[A2] = ListBox1.Column(1)
[A3] = ListBox1.Column(2)
End Sub
JB
Coucou
Tout est dans le titre... Comment récupérer dans excel les adresses qui
sont dans outlook ? J'ai cherché sur excelabo mais c'est un pur scandale
ça y est même pas !!!
idéalement ce serait bien d'y accéder via un menu déroulant.
Il ne s'agit PAS de faire du publipostage mais juste d'incorporer une
adresse dans une feuille excel.
Merci de votre aide ;-)
--
Misange migrateuse
XlWiki : Participez à un travail collaboratif sur excel !
http://xlwiki.free.fr/wiki
http://www.excelabo.net
Bonjour Misange,
Liste triée des contacts dans un formulaire:
Pour récupérer le formulaire dans un classeur Excel, utiiliser
Exporter/Importer formulaire.
http://cjoint.com/?lxfPfkbKKn
Private Sub UserForm_Initialize()
' Outils/Référence OutLook
Dim Tbl()
Dim olNS As Outlook.Namespace
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set Contacts = olNS.GetDefaultFolder(olFolderContacts)
Set LItems = Contacts.Items
n = 0
For Each i In LItems
ReDim Preserve Tbl(0 To 2, 0 To n)
Tbl(0, n) = i.FirstName
Tbl(1, n) = i.LastName
Tbl(2, n) = i.Email1Address
n = n + 1
Next
Tri Tbl()
Me.ListBox1.List = Application.Transpose(Tbl)
End Sub
Sub Tri(table())
xn = UBound(table, 2)
ecart = xn ' tri shell
Do While ecart >= 1
ecart = ecart 2
inv = True
Do While inv
inv = False
For i = 0 To xn - ecart
j = i + ecart
If table(0, j) < table(0, i) Then
temp = table(0, j): table(0, j) = table(0, i): table(0, i) > temp
temp = table(1, j): table(1, j) = table(1, i): table(1, i) > temp
temp = table(2, j): table(2, j) = table(2, i): table(2, i) > temp
inv = True
End If
Next
Loop
Loop
End Sub
Private Sub ListBox1_Click()
[A1] = ListBox1
[A2] = ListBox1.Column(1)
[A3] = ListBox1.Column(2)
End Sub
JBCoucou
Tout est dans le titre... Comment récupérer dans excel les adresses qui
sont dans outlook ? J'ai cherché sur excelabo mais c'est un pur scandale
ça y est même pas !!!
idéalement ce serait bien d'y accéder via un menu déroulant.
Il ne s'agit PAS de faire du publipostage mais juste d'incorporer une
adresse dans une feuille excel.
Merci de votre aide ;-)
--
Misange migrateuse
XlWiki : Participez à un travail collaboratif sur excel !
http://xlwiki.free.fr/wiki
http://www.excelabo.net
Bonjour Jluc,
Je n'ai pas d'autre version d'OutLook pour tester. Je suis surpris que
la syntaxe ne soit pas la même.
Autre version:(les contacts sont mémorisés dans une feuille Contacts.
Ajouter un bouton pour rafraichier ou supprimer la feuille contacts)
http://cjoint.com/?lxiGo0EFAT
Private Sub UserForm_Initialize()
On Error Resume Next
temp = Sheets("contacts").Range("a1")
If Err <> 0 Then
Sheets.Add after:=Sheets(Sheets.Count)
ActiveSheet.Name = "Contacts"
LitOutLook
Sheets(1).Select
End If
Me.ListBox1.RowSource = "Contacts!A1:C" &
Sheets("contacts").[a65000].End(xlUp).Row
End Sub
Sub LitOutLook()
Dim olNS As Outlook.Namespace
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set Contacts = olNS.GetDefaultFolder(olFolderContacts)
Set LItems = Contacts.Items
n = 1
For Each i In LItems
Sheets("contacts").Cells(n, 1) = i.FirstName
Sheets("contacts").Cells(n, 2) = i.LastName
Sheets("contacts").Cells(n, 3) = i.Email1Address
n = n + 1
Next
Sheets("contacts").[A1].Sort key1:=Sheets("contacts").[A1]
End Sub
Private Sub ListBox1_Click()
[A1] = ListBox1
[A2] = ListBox1.Column(1)
[A3] = ListBox1.Column(2)
End Sub
JB*Bonjour JB*,
Ta petite appli m'a l'air interessante.
Pour utiliser ton code, il faut "Microsoft Outlook 11.0 Object Library"
Comme je n'ai que office 2000 (9.0), que faut il modifier pour
l'utiliser ?Bonjour Misange,
Liste triée des contacts dans un formulaire:
Pour récupérer le formulaire dans un classeur Excel, utiiliser
Exporter/Importer formulaire.
http://cjoint.com/?lxfPfkbKKn
Private Sub UserForm_Initialize()
' Outils/Référence OutLook
Dim Tbl()
Dim olNS As Outlook.Namespace
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set Contacts = olNS.GetDefaultFolder(olFolderContacts)
Set LItems = Contacts.Items
n = 0
For Each i In LItems
ReDim Preserve Tbl(0 To 2, 0 To n)
Tbl(0, n) = i.FirstName
Tbl(1, n) = i.LastName
Tbl(2, n) = i.Email1Address
n = n + 1
Next
Tri Tbl()
Me.ListBox1.List = Application.Transpose(Tbl)
End Sub
Sub Tri(table())
xn = UBound(table, 2)
ecart = xn ' tri shell
Do While ecart >= 1
ecart = ecart 2
inv = True
Do While inv
inv = False
For i = 0 To xn - ecart
j = i + ecart
If table(0, j) < table(0, i) Then
temp = table(0, j): table(0, j) = table(0, i): table(0, i) >>> temp
temp = table(1, j): table(1, j) = table(1, i): table(1, i) >>> temp
temp = table(2, j): table(2, j) = table(2, i): table(2, i) >>> temp
inv = True
End If
Next
Loop
Loop
End Sub
Private Sub ListBox1_Click()
[A1] = ListBox1
[A2] = ListBox1.Column(1)
[A3] = ListBox1.Column(2)
End Sub
JBCoucou
Tout est dans le titre... Comment récupérer dans excel les adresses qui
sont dans outlook ? J'ai cherché sur excelabo mais c'est un pur scandale
ça y est même pas !!!
idéalement ce serait bien d'y accéder via un menu déroulant.
Il ne s'agit PAS de faire du publipostage mais juste d'incorporer une
adresse dans une feuille excel.
Merci de votre aide ;-)
--
Misange migrateuse
XlWiki : Participez à un travail collaboratif sur excel !
http://xlwiki.free.fr/wiki
http://www.excelabo.net
--
____
( O | O )
--
_oooO_ JLuc _Oooo_
O-O
Bonjour Jluc,
Je n'ai pas d'autre version d'OutLook pour tester. Je suis surpris que
la syntaxe ne soit pas la même.
Autre version:(les contacts sont mémorisés dans une feuille Contacts.
Ajouter un bouton pour rafraichier ou supprimer la feuille contacts)
http://cjoint.com/?lxiGo0EFAT
Private Sub UserForm_Initialize()
On Error Resume Next
temp = Sheets("contacts").Range("a1")
If Err <> 0 Then
Sheets.Add after:=Sheets(Sheets.Count)
ActiveSheet.Name = "Contacts"
LitOutLook
Sheets(1).Select
End If
Me.ListBox1.RowSource = "Contacts!A1:C" &
Sheets("contacts").[a65000].End(xlUp).Row
End Sub
Sub LitOutLook()
Dim olNS As Outlook.Namespace
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set Contacts = olNS.GetDefaultFolder(olFolderContacts)
Set LItems = Contacts.Items
n = 1
For Each i In LItems
Sheets("contacts").Cells(n, 1) = i.FirstName
Sheets("contacts").Cells(n, 2) = i.LastName
Sheets("contacts").Cells(n, 3) = i.Email1Address
n = n + 1
Next
Sheets("contacts").[A1].Sort key1:=Sheets("contacts").[A1]
End Sub
Private Sub ListBox1_Click()
[A1] = ListBox1
[A2] = ListBox1.Column(1)
[A3] = ListBox1.Column(2)
End Sub
JB
*Bonjour JB*,
Ta petite appli m'a l'air interessante.
Pour utiliser ton code, il faut "Microsoft Outlook 11.0 Object Library"
Comme je n'ai que office 2000 (9.0), que faut il modifier pour
l'utiliser ?
Bonjour Misange,
Liste triée des contacts dans un formulaire:
Pour récupérer le formulaire dans un classeur Excel, utiiliser
Exporter/Importer formulaire.
http://cjoint.com/?lxfPfkbKKn
Private Sub UserForm_Initialize()
' Outils/Référence OutLook
Dim Tbl()
Dim olNS As Outlook.Namespace
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set Contacts = olNS.GetDefaultFolder(olFolderContacts)
Set LItems = Contacts.Items
n = 0
For Each i In LItems
ReDim Preserve Tbl(0 To 2, 0 To n)
Tbl(0, n) = i.FirstName
Tbl(1, n) = i.LastName
Tbl(2, n) = i.Email1Address
n = n + 1
Next
Tri Tbl()
Me.ListBox1.List = Application.Transpose(Tbl)
End Sub
Sub Tri(table())
xn = UBound(table, 2)
ecart = xn ' tri shell
Do While ecart >= 1
ecart = ecart 2
inv = True
Do While inv
inv = False
For i = 0 To xn - ecart
j = i + ecart
If table(0, j) < table(0, i) Then
temp = table(0, j): table(0, j) = table(0, i): table(0, i) >>> temp
temp = table(1, j): table(1, j) = table(1, i): table(1, i) >>> temp
temp = table(2, j): table(2, j) = table(2, i): table(2, i) >>> temp
inv = True
End If
Next
Loop
Loop
End Sub
Private Sub ListBox1_Click()
[A1] = ListBox1
[A2] = ListBox1.Column(1)
[A3] = ListBox1.Column(2)
End Sub
JB
Coucou
Tout est dans le titre... Comment récupérer dans excel les adresses qui
sont dans outlook ? J'ai cherché sur excelabo mais c'est un pur scandale
ça y est même pas !!!
idéalement ce serait bien d'y accéder via un menu déroulant.
Il ne s'agit PAS de faire du publipostage mais juste d'incorporer une
adresse dans une feuille excel.
Merci de votre aide ;-)
--
Misange migrateuse
XlWiki : Participez à un travail collaboratif sur excel !
http://xlwiki.free.fr/wiki
http://www.excelabo.net
--
____
( O | O )
--
_oooO_ JLuc _Oooo_
O-O
Bonjour Jluc,
Je n'ai pas d'autre version d'OutLook pour tester. Je suis surpris que
la syntaxe ne soit pas la même.
Autre version:(les contacts sont mémorisés dans une feuille Contacts.
Ajouter un bouton pour rafraichier ou supprimer la feuille contacts)
http://cjoint.com/?lxiGo0EFAT
Private Sub UserForm_Initialize()
On Error Resume Next
temp = Sheets("contacts").Range("a1")
If Err <> 0 Then
Sheets.Add after:=Sheets(Sheets.Count)
ActiveSheet.Name = "Contacts"
LitOutLook
Sheets(1).Select
End If
Me.ListBox1.RowSource = "Contacts!A1:C" &
Sheets("contacts").[a65000].End(xlUp).Row
End Sub
Sub LitOutLook()
Dim olNS As Outlook.Namespace
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set Contacts = olNS.GetDefaultFolder(olFolderContacts)
Set LItems = Contacts.Items
n = 1
For Each i In LItems
Sheets("contacts").Cells(n, 1) = i.FirstName
Sheets("contacts").Cells(n, 2) = i.LastName
Sheets("contacts").Cells(n, 3) = i.Email1Address
n = n + 1
Next
Sheets("contacts").[A1].Sort key1:=Sheets("contacts").[A1]
End Sub
Private Sub ListBox1_Click()
[A1] = ListBox1
[A2] = ListBox1.Column(1)
[A3] = ListBox1.Column(2)
End Sub
JB*Bonjour JB*,
Ta petite appli m'a l'air interessante.
Pour utiliser ton code, il faut "Microsoft Outlook 11.0 Object Library"
Comme je n'ai que office 2000 (9.0), que faut il modifier pour
l'utiliser ?Bonjour Misange,
Liste triée des contacts dans un formulaire:
Pour récupérer le formulaire dans un classeur Excel, utiiliser
Exporter/Importer formulaire.
http://cjoint.com/?lxfPfkbKKn
Private Sub UserForm_Initialize()
' Outils/Référence OutLook
Dim Tbl()
Dim olNS As Outlook.Namespace
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set Contacts = olNS.GetDefaultFolder(olFolderContacts)
Set LItems = Contacts.Items
n = 0
For Each i In LItems
ReDim Preserve Tbl(0 To 2, 0 To n)
Tbl(0, n) = i.FirstName
Tbl(1, n) = i.LastName
Tbl(2, n) = i.Email1Address
n = n + 1
Next
Tri Tbl()
Me.ListBox1.List = Application.Transpose(Tbl)
End Sub
Sub Tri(table())
xn = UBound(table, 2)
ecart = xn ' tri shell
Do While ecart >= 1
ecart = ecart 2
inv = True
Do While inv
inv = False
For i = 0 To xn - ecart
j = i + ecart
If table(0, j) < table(0, i) Then
temp = table(0, j): table(0, j) = table(0, i): table(0, i) >>> temp
temp = table(1, j): table(1, j) = table(1, i): table(1, i) >>> temp
temp = table(2, j): table(2, j) = table(2, i): table(2, i) >>> temp
inv = True
End If
Next
Loop
Loop
End Sub
Private Sub ListBox1_Click()
[A1] = ListBox1
[A2] = ListBox1.Column(1)
[A3] = ListBox1.Column(2)
End Sub
JBCoucou
Tout est dans le titre... Comment récupérer dans excel les adresses qui
sont dans outlook ? J'ai cherché sur excelabo mais c'est un pur scandale
ça y est même pas !!!
idéalement ce serait bien d'y accéder via un menu déroulant.
Il ne s'agit PAS de faire du publipostage mais juste d'incorporer une
adresse dans une feuille excel.
Merci de votre aide ;-)
--
Misange migrateuse
XlWiki : Participez à un travail collaboratif sur excel !
http://xlwiki.free.fr/wiki
http://www.excelabo.net
--
____
( O | O )
--
_oooO_ JLuc _Oooo_
O-O
Pour utiliser ton code, il faut "Microsoft Outlook 11.0 Object Library"
Comme je n'ai que office 2000 (9.0), que faut il modifier pour
l'utiliser ?
Tu dois simplement modifier la bibliothèque.
Tu ouvres l'éditeur de code, outils , référence et tu coches
la version de la bibliothèque que tu as :
"Microsoft Outlook X.0 Librairy"
Pour utiliser ton code, il faut "Microsoft Outlook 11.0 Object Library"
Comme je n'ai que office 2000 (9.0), que faut il modifier pour
l'utiliser ?
Tu dois simplement modifier la bibliothèque.
Tu ouvres l'éditeur de code, outils , référence et tu coches
la version de la bibliothèque que tu as :
"Microsoft Outlook X.0 Librairy"
Pour utiliser ton code, il faut "Microsoft Outlook 11.0 Object Library"
Comme je n'ai que office 2000 (9.0), que faut il modifier pour
l'utiliser ?
Tu dois simplement modifier la bibliothèque.
Tu ouvres l'éditeur de code, outils , référence et tu coches
la version de la bibliothèque que tu as :
"Microsoft Outlook X.0 Librairy"