Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More Lotus Notes e-mail questions.
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00391154
Message ID:
00395801
Views:
31
Kevin,
If you are using the TYPE() function, you also have to check to make sure the bariable 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

>...Actually, I wrote this on one machine, copied it to the machine whre I access the UT, ran and debugged it on the other machine and never updated the copy. Sorry. ;-(
>
>Did it help?...
>
>Larry,
>
>I am not sure yet. They got an error saying "oSebdTo" is not an object, but looking at the code it seems to me the only way it could have gotten to the
>offending line is for oSendTo to be an object. I will have to wait until
>Monday to find out which line of code actually caused the error. Note I am using vfp5 and changed the vartype() line to type().
>
>Kevin
>
> DO while occurs(";",lcsendstr) > 0
> lctemp = alltrim(left(lcsendstr,at(";", lcsendstr)-1) )
> oSendTo = loDoc.GetFirstItem("SendTo")
>*!* ***IF vartype(oSendTo) <> "O" then && vfp6.0 syntax
> IF type("oSendTo") <> "O"
> loDoc.AppendItemValue("SendTo",lctemp)
> ELSE
> oSendTo.AppendToTextList(lctemp)
> ENDIF
> lcsendstr = substr(lcsendstr,at(";",lcsendstr)+1)
> ENDDO
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform