我试图限制一组olcontactItems
使用TaskDueDate Property
我从周日开始尝试过的各种方式,但我不断收到错误。最近的错误是
“条件无效”
我检查以确保组中的每个联系人markedastask
都是真实的,并且他们都回来了。我不确定如何进行。
If MassEmail.TimeFrame.Value <> "" Then
Select Case MassEmail.TimeFrame
Case "Due Today"
subjFlag = Date
Case "This Week"
subjFlag = Date + 7
Case "Next Week"
subjFlag = Date + 14
Case ""
subjFlag = Date
Case Else
subjFlag = Date
End Select
End If
Set supercontacts = allContacts.Restrict("[Categories]=" & myCat & "")
MsgBox supercontacts.Count
If subjFlag <> "" Then
Set supercontacts = supercontacts.Restrict("[TaskDueDate]<=" & subjFlag & "")
MsgBox supercontacts.Count
End If