dà anche a me lo stesso problema con questo codice
codice:
Option Explicit
Dim olApp As Outlook.Application
Dim olNS As Outlook.NameSpace
Dim olAL As Outlook.AddressList
Dim olAE As Outlook.AddressEntry
Dim olMail As Outlook.MailItem
Private Sub Form_Load()
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
For Each olAL In olNS.AddressLists
For Each olAE In olAL.AddressEntries
lvw.ListItems.Add , , olAE.Name
lvw.ListItems(lvw.ListItems.Count).SubItems(1) = olAE.Address
lvw.ListItems(lvw.ListItems.Count).SubItems(2) = olAE.ID
lvw.ListItems(lvw.ListItems.Count).Tag = olAE.ID
Next
Next
End Sub
Private Sub Form_Unload(Cancel As Integer)
olApp.Quit
Set olApp = Nothing
End Sub
Private Sub lvw_DblClick()
Set olMail = olApp.CreateItem(olMailItem)
olMail.Recipients.Add lvw.SelectedItem.Text
olMail.Subject = "Test"
olMail.Body = "Test"
olMail.Send
End Sub