You still haven't explained what it is that you are really trying to do with regard to the attachments or how many required attachments there are, but for one named attachment
You will need also to declare the variable bAttach as Boolean
' /* Check the required attachment(s). */
For i = 1 To Item.Attachments.Count
If Item.Attachments(i).fileName = "filename.ext" Then
bAttach = True
Exit For
End If
Next i
If Not bAttach = True Then
MsgBox "Attachment missing.", vbExclamation, "Message"
Cancel = True
End If
or if the name varies, but the extension remains the same (here the last four characters of the filename are docx)
' /* Check the required attachment(s). */
For i = 1 To Item.Attachments.Count
If Right(Item.Attachments(i).fileName, 4) = "docx" Then
bAttach = True
Exit For
End If
Next i
If Not bAttach = True Then
MsgBox "Attachment missing.", vbExclamation, "Message"
Cancel = True
End If
For more than one required attachment you will need to provide more detail.