我需要下面的代码每隔30秒执行一次,持续9分钟才能继续前进。有任何想法吗?
'Begin 9 minute loop
CLEAR CONTENTS
Dim newFIle
Set FSO = CreateObject("Scripting.FileSystemObject")
Set newFIle = FSO.CreateTextFile("C:\Users\Owner\Desktop\RECALL\OutlookExport.csv", True, False)
newFIle.Write "Need Data"
newFIle.Close
Set FSO = CreateObject("Scripting.FileSystemObject")
'Choose File
Set csvOut = FSO.OpenTextFile("C:\Users\Owner\Desktop\RECALL\OutlookExport.csv", 8, True)
'Export Messages
For Each email In inbox.Folders.Item(CInt(response)).Items
csvOut.Write (Chr(34) & email.SenderName & Chr(34) & ",")
csvOut.Write email.Body
csvOut.Write (vbNewLine)
Next
'Pause 30 seconds
'Return to "Begin 9 Minute Loop
'Repeat 18 times
'End 9 minute loop (Execute remainder of code)