Ik wil iets doen met geselecteerde mails.
Wie helpt mij verder?
===========================================================================
Sub DisplayMailparts()
'Ref: https://stackoverflow.com/questions...ails-and-display-the-first-name-on-each-email
'Finally this routine will store selected e-mails with a specified name in the specified map (selection with a dropbox)
'Declaration of parameters
Dim myItem As Object
Dim olMail As Outlook.MailItem
Dim Selection As Selection
Dim n As Integer
Dim myFolder As Folder
Set myNamespace = Application.GetNamespace("MAPI")
Dim strSender, strReceiver As String 'Names will be shortened of extented to fix number of characters
Dim strDate As String, strYear, strMonth, strDayr, strHour, strMinute As String 'myItem.CreationTime shall be converter to yyyy-mm-dd hh:mm
Dim strPath As String '
'Read parameters for dropbox
'
'Store each selcted e-mail in a specified map
Set Selection = Application.ActiveExplorer.Selection
For Each myItem In Selection
n = n + 1
Set olMail = Application.ActiveExplorer().Selection(n)
MsgBox olMail.Subject
'& vbCrLf & myItem.Subject & vbCrLf & myItem.CreationTime & vbCrLf & myItem.Companies & vbCrLf & myItem.SenderName
Next
'Ouput format: yyyy-mm-dd hh:mm | O | Receivername | Subject.msg or
' yyyy-mm-dd hh:mm | I | Sendername | Subject.msg
'Mailobject.SaveAs strPath & "\" & strDate & " | " & olMail.subject & ".msg", olMSG
End Sub
Wie helpt mij verder?
===========================================================================
Sub DisplayMailparts()
'Ref: https://stackoverflow.com/questions...ails-and-display-the-first-name-on-each-email
'Finally this routine will store selected e-mails with a specified name in the specified map (selection with a dropbox)
'Declaration of parameters
Dim myItem As Object
Dim olMail As Outlook.MailItem
Dim Selection As Selection
Dim n As Integer
Dim myFolder As Folder
Set myNamespace = Application.GetNamespace("MAPI")
Dim strSender, strReceiver As String 'Names will be shortened of extented to fix number of characters
Dim strDate As String, strYear, strMonth, strDayr, strHour, strMinute As String 'myItem.CreationTime shall be converter to yyyy-mm-dd hh:mm
Dim strPath As String '
'Read parameters for dropbox
'
'Store each selcted e-mail in a specified map
Set Selection = Application.ActiveExplorer.Selection
For Each myItem In Selection
n = n + 1
Set olMail = Application.ActiveExplorer().Selection(n)
MsgBox olMail.Subject
'& vbCrLf & myItem.Subject & vbCrLf & myItem.CreationTime & vbCrLf & myItem.Companies & vbCrLf & myItem.SenderName
Next
'Ouput format: yyyy-mm-dd hh:mm | O | Receivername | Subject.msg or
' yyyy-mm-dd hh:mm | I | Sendername | Subject.msg
'Mailobject.SaveAs strPath & "\" & strDate & " | " & olMail.subject & ".msg", olMSG
End Sub