0
Outlook 2007에서 보낸 사람/연락처 이미지를 자동/프로그래밍 방식으로 어떻게 설정할 수 있습니까? 그들은 동료이며, 모든 직원 사진은 netshare에 저장됩니다.프로그래밍 방식으로 Outlook 2007에서 연락처 이미지를 설정하는 방법?
Outlook 2007에서 보낸 사람/연락처 이미지를 자동/프로그래밍 방식으로 어떻게 설정할 수 있습니까? 그들은 동료이며, 모든 직원 사진은 netshare에 저장됩니다.프로그래밍 방식으로 Outlook 2007에서 연락처 이미지를 설정하는 방법?
Outlook.ContactItem에는 AddPicture 메서드가 있습니다. 다음은 도움말 파일의 예입니다.
Sub AddPictureToAContact()
Dim myNms As Outlook.NameSpace
Dim myFolder As Outlook.Folder
Dim myContactItem As Outlook.ContactItem
Dim strName As String
Dim strPath As String
Dim strPrompt As String
Set myNms = Application.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