Sub GetMail()
'outlookからメールを取り出します
Dim objOutlook As Outlook.Application
Dim myNamespace As Outlook.Namespace
Dim myInbox, mySubfolder
Set objOutlook = New Outlook.Application
Set myNamespace = objOutlook.GetNamespace("MAPI")
Dim i As Long
Dim sendSelf As Boolean '本人宛てメッセージFLAG
Dim hasCC As Boolean
Dim startTime As Date
Dim endTime As Date
Dim mailTime As Date
Dim mailBox As String
Dim this_sheets As Sheets
Dim folder_flag As Boolean
Set this_sheets = ThisWorkbook.Sheets
startTime = this_sheets("パラメータ").Range("b2").Value
endTime = this_sheets("パラメータ").Range("c2").Value
mailBox = this_sheets("パラメータ").Range("b1").Value
'元のデータを削除
this_sheets("data").Range("2:" & Rows.count).ClearContents
this_sheets("sample").Range("j2").Valu