Hmmm, Have to think about this. Looking at the old code:
oSendTo = loDoc.GetFirstItem("SendTo")
IF type("oSendTo") <> "O"
Wouldn't type("oSendTo") = "O" if there was already a recipient and = "U" in all other cases? I guess I need to get my Hacker's Guide out and read about Vartype() and Type().
Kevin
...Kevin,
If you are using the TYPE() function, you also have to check to make sure the variable is not .NULL..
ovar = createobject("whatever")
? type("ovar") && prints O
ovar = .NULL.
? type("ovar") && still prints O
? isnull(ovar) && prints .T.
if type("OSendTO") = "O" and !isnull(oSendTo) then ...