non è difficile interagire con outlook
codice:Public Sub OutLookTest() On Error GoTo Errore Dim MyO As Object Dim MyMail As MailItem Dim MyNameSpace As NameSpace 'apre Outlook Set MyO = New OutLook.Application If MyO Is Nothing Then MsgBox "Impossibile trovare OutLook" Exit Sub End If MyO.Visible = False ' così non lo vedi Set MyNameSpace = MyO.GetNamespace("MAPI") ' qui ti conviene mettere un bel breakpoint e guardare ' l'oggetto myNameSpace cosa contiene. Trovi tutte le cartelle ' di outlook compresa la posta ricevuta e le sue sottocartelle ' Puoi leggere i messaggi con un ciclo for each For Each myMail in MyNameSpace.Folders.item("Cartelle Personali").Folders.item("Posta in arrivo") ' tuo codice per estrarre il testo e inserirlo nel db next myMail Set MyMail = Nothing Set MyNameSpace = Nothing Set MyO = Nothing End Sub

Rispondi quotando