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
 To: Steven Black
  Where is Steven Black?
 Kingston
 Canada
 Steven Black
 Tags
Subject: RE: Syntax error - please assist
Thread ID: 22371 Message ID: 22378 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: General VFP Topics
Date: Wednesday, April 16, 2003 6:20:56 PM         
   


> Hi Paul,
>
> Replace your SET TEXTMERGE program segment with this:
>
> TEXT TO myVar TEXTMERGE NOSHOW...
> Tracking Number : <>
> Phone Number : <>
> ENDTEXT
>
> (Remember to remove the "\" prefix before each line).
>
> SET TEXTMERGE is really replaced with TEXT TO....ENDTEXT starting in VFP 7.
>
> **--** Steve

THANKS STEVE:

HERE"S THE WORKING MODEL (SEE BELOW).
PS - This works fine with Lotus Notes, however when using Outlook 2000, receive an Mapi error; may sugested diffrent aproaches, like MS onl-ine document, using CDO, all attempts have failed??

*************************************
&&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()
lcTarget = 'pm007_@email.com'&& Sending all to myself
*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
.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

Syntax error - please assist Posted by Paul Michael @ 4/16/2003 5:01:50 PM
RE: Syntax error - please assist Posted by Steven Black @ 4/16/2003 5:59:19 PM
RE: Syntax error - please assist Posted by Paul Michael @ 4/16/2003 6:20:56 PM