Ciao Sergio,
Post by SergioBSin effetti devo estrarre la data/ora contenuta nel testo delle emails e
con queste creare alcuni grafici...
pertanto pensavo di utilizzare Excel
Per creare un nuovo foglio nel workbook attivo ed estrarre l'oggetto / data
/ mittente da tutti i email nell cartella di Outlook "Pippo", prova:
'=============>>
Public Sub Tester001()
Dim myOlapp As Object
Dim myNamespace As Object
Dim myFolder As Object
Dim myNewFolder As Object
Dim myItem As Object
Dim SH As Worksheet
Dim i As Long
Const miaCartella As String = "Pippo" '<<==== CAMBIA
Set myOlapp = CreateObject("Outlook.Application")
Set myNamespace = myOlapp.GetNamespace("MAPI")
Set myFolder = _
myNamespace.GetDefaultFolder(6) '(olFolderInbox)= 6
Set myNewFolder = myFolder.Folders(miaCartella)
On Error Resume Next
Application.DisplayAlerts = False
Sheets("Email").Delete
Application.DisplayAlerts = True
On Error GoTo XIT
Set SH = ActiveWorkbook.Sheets.Add
SH.Name = "Email"
With SH
i = 1
.Range("A1:C1").Value = _
Array("Data", "Mittente", "Oggetto")
For Each myItem In myNewFolder.Items
i = i + 1
.Cells(i, 1).Value = myItem.ReceivedTime
.Cells(i, 2).Value = myItem.SenderName
.Cells(i, 3).Value = myItem.Subject
Next myItem
.UsedRange.Columns.AutoFit
End With
XIT:
Set myOlapp = Nothing
Set myNamespace = Nothing
Set myFolder = Nothing
Set myNewFolder = Nothing
Set myItem = Nothing
End Sub
'<<=============
Sostituisci "Pippo" col nome della cartella di Outlook che contiene i email
importati da OE.
---
Regards,
Norman