Dim CNN As New ADODB. Connection
Dim the rs As the ADODB library you
Lianjie="Provider=Microsoft. Jet. The OLEDB. 4.0. Extended Properties='Excel 8.0; HDR=yes; '; The Data Source=C: \ Eva Yu \ A.x ls
"
CNN. Open lianjie
St="select attachment from [sheet1 $] where email='" & amp; Item. The To & amp; "'
"
Set the rs=CNN. The Execute (st)
If Not (IsNull (rs (" attachment "))) Then
Item. Attachments. The Add (rs (" attachment "))
End the If
Rs. Close
CNN. Close
Application. Wait (Now + TimeValue (" 00:03:00 "))
End Sub
CodePudding user response:
Application. Wait (Now + TimeValue (" 00:03:00 "))This sentence, first check documents, understand the wait is refers to the "wait for a period of time" or "wait until a point in time"
CodePudding user response:
Application. The OnTimeCodePudding user response:
Why not use a timer or while true death cycle