Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Paul Michael
  Where is Paul Michael?
 Shelton
 Connecticut - United States
 Paul Michael
 Tags
Subject: Variable Not found - Please Assist
Thread ID: 22386 Message ID: 22386 # Views: 7 # Ratings: 0
Version: Visual FoxPro 6 Category: General VFP Topics
Date: Wednesday, April 16, 2003 9:00:06 PM         
   


Good afternoon Foxpro Guru's:

This is a modified email program of mine I posted yesterday.

Thank you,
PM

Error message - Variable 'Recvremail' is not found

VFP Debugger (crashing here): lcTarget = Recvremail
Click ignore, all my data will get to my Lotus Notes email. In the email form TO: False (due to my error)
So we know where the problem lies.

My target, Recvremail is the field that contains the email address in my Mails.dbf. For everr record/email I send I need the address to appear in the "TO" location hence, False appears. It just may be simple as declaring my variable?? any sugestions?

Code:

*****************************************************************
&&Program works with Lotus Notes.
Create Cursor testmail (signed c(1), Trackno i, Rdate d)
For ix=1 To 100
Insert Into testmail Values ;
(Chr(Asc('a')-1+Ceiling(Rand()*26)), ix, Date()-ix)
Endfor
Browse For signed = 'n' && Would email these

Local lcTarget, lcCurdir, oForm
lcCurdir = Sys(5)+Curdir()

Select testmail
oForm = Createobject("form")
oForm.AddObject("oSession","olecontrol","MSMAPI.mapiSession")
oForm.AddObject("oMessage","olecontrol","MSMAPI.mapiMessages")
oForm.oSession.signOn
With oForm.oMessage
.sessionid = oForm.oSession.sessionid
Scan For signed = 'n' && Would email these

lcTarget = recvremail &&The email field in the mails.dbf
.compose
Select mails

lcTempText = sys(2015)+'.tmp'
Set textmerge on
Set textmerge to (lcTempText) noshow

\Tracking Number : <>
\Carrier Name : <>
\Service Name : <>
\Date Received : <>
\Time Received : <>
\Rcv Clerk ID : <>
\Sender Name : <>
\Sender Address : <>
\Sender City : <>
\Sender State : <>
\Sender Zip : <>
\Phone Number : <>
Set textmerge to
Set textmerge off

lnHandle=fopen(lcTempText)
lnSize=fseek(lnHandle,0,2)
Fseek(lnHandle,0,0)
lcMyVar = fread(lnHandle,lnSize)
Fclose(lnHandle)
Erase (lcTempText)
.msgsubject = "Package Notification"
.msgnotetext = lcMyVar
.RecipAddress = lcTarget
.RecipType = 1
.ResolveName()
.Send(.F.)
Endscan
Endwith
Set Default To (lcCurdir)


COMPLETE THREAD

Variable Not found - Please Assist Posted by Paul Michael @ 4/16/2003 9:00:06 PM
RE: Variable Not found - Please Assist Posted by Michael Gill @ 4/16/2003 11:12:45 PM