I`ve been struggling on this one for days...


Is there a way to check if an array index contains data?
I am trying to automate Outlook. If I delete the most highly indexed message I get an error message "Array index is out of bounds..."

I simply want to do a check on the particular index to see if it contains a value



eg:
if not ofolder.items(5) = NULL then
msgbox("Contains data")
else
msgbox("Contains nothing")
end if