Photos contact outlook via access
BLONDAWWW
-
incaout Messages postés 347 Date d'inscription Statut Membre Dernière intervention -
incaout Messages postés 347 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
je voudrai savoir si il est possible de modifier la photos d'un contact outlook via une ligne de code vba access
j'explique:
en gros quand je clique sur un bouton je voudrai modifier la photo d'un contact ou meme si c'est possible que ça se face a une date précise
est ce que c'est possible d'après vous? je cherche sur le web mais sans résultat
merci
je voudrai savoir si il est possible de modifier la photos d'un contact outlook via une ligne de code vba access
j'explique:
en gros quand je clique sur un bouton je voudrai modifier la photo d'un contact ou meme si c'est possible que ça se face a une date précise
est ce que c'est possible d'après vous? je cherche sur le web mais sans résultat
merci
A voir également:
- Photos contact outlook via access
- Partager des photos - Guide
- Toutes mes photos - Guide
- Google photos - Télécharger - Albums photo
- Synchroniser agenda google et outlook - Guide
- Doublons photos - Guide
3 réponses
Bonjour,
Je pense que cela doit être possible en utilisant l'automation, c'est à dire demander à Access de piloter outlook en créant dans Access un environnement outlook afin de pouvoir accéder aux objets de type contact dans outlook et modifier leur propriété.
Quelle version de Access et outlook utilises tu ?
Cdlt
IC
Je pense que cela doit être possible en utilisant l'automation, c'est à dire demander à Access de piloter outlook en créant dans Access un environnement outlook afin de pouvoir accéder aux objets de type contact dans outlook et modifier leur propriété.
Quelle version de Access et outlook utilises tu ?
Cdlt
IC
merci de me repondre j'ai trouve ce code sur internet qui est intéréssant je v le modifier a ma façon merci beaucoup
The following Microsoft Visual Basic for Applications (VBA) example prompts the user to specify the name of a contact and the file name containing a picture of the contact, and then adds the picture to the contact item. If a picture already exists for the contact item, the example prompts the user to specify if the existing picture should be overwritten by the new file.
Sub AddPictureToAContact()
Dim myOlApp As Outlook.Application
Dim myNms As Outlook.NameSpace
Dim myFolder As Outlook.MAPIFolder
Dim myContactItem As Outlook.ContactItem
Dim strName As String
Dim strPath As String
Dim strPrompt As String
Set myOlApp = CreateObject("Outlook.Application")
Set myNms = myOlApp.GetNamespace("MAPI")
Set myFolder = myNms.GetDefaultFolder(olFolderContacts)
strName = InputBox("Type the name of the contact: ")
Set myContactItem = myFolder.Items(strName)
If myContactItem.HasPicture = True Then
strPrompt = MsgBox("The contact already has a picture associated with it. Do you want to overwrite the existing picture?", vbYesNo)
If strPrompt = vbNo Then
Exit Sub
End If
End If
strPath = InputBox("Type the file name for the contact: ")
myContactItem.AddPicture (strPath)
myContactItem.Save
myContactItem.Display
End Sub
The following Microsoft Visual Basic for Applications (VBA) example prompts the user to specify the name of a contact and the file name containing a picture of the contact, and then adds the picture to the contact item. If a picture already exists for the contact item, the example prompts the user to specify if the existing picture should be overwritten by the new file.
Sub AddPictureToAContact()
Dim myOlApp As Outlook.Application
Dim myNms As Outlook.NameSpace
Dim myFolder As Outlook.MAPIFolder
Dim myContactItem As Outlook.ContactItem
Dim strName As String
Dim strPath As String
Dim strPrompt As String
Set myOlApp = CreateObject("Outlook.Application")
Set myNms = myOlApp.GetNamespace("MAPI")
Set myFolder = myNms.GetDefaultFolder(olFolderContacts)
strName = InputBox("Type the name of the contact: ")
Set myContactItem = myFolder.Items(strName)
If myContactItem.HasPicture = True Then
strPrompt = MsgBox("The contact already has a picture associated with it. Do you want to overwrite the existing picture?", vbYesNo)
If strPrompt = vbNo Then
Exit Sub
End If
End If
strPath = InputBox("Type the file name for the contact: ")
myContactItem.AddPicture (strPath)
myContactItem.Save
myContactItem.Display
End Sub