Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with textmerge
Message
 
 
To
15/12/2003 16:54:39
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00859321
Message ID:
00859370
Views:
14
Lorne,

You've to use Name expression so VFP would interpret a variable value as a file name. SET TEXTMERGE TO will close output file.
lfullname = lpath + lfile
SET TEXTMERGE ON NOSHOW
SET TEXTMERGE TO (lfullname)
....
* Close output file
SET TEXTMERGE TO
>I need to write an assortment of documents via textmerge. No problem with the format, it's opening files dynamicly that is messing up
> my code:
>lfullname = lpath + lfile
>lhfile = FOPEN(lfullname, 11)
>SET TEXTMERGE ON
>SET TEXTMERGE TO lhfile
>
>writes to a file called lhfile (lhfile.txt, not what it ought to be), not the file and path contained in lpath and lfile, and to close the file after exporting the data, I want to use the handle (lhfile). I have also tried it with TO lfullname to no avail, it still opens as lfullname.txt, not expinv.csv as in the var lfile.
>I can't hard code the file and path in, so I need to do it this way or similar.
>
>Thanks
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform