Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memo Fields to Text Files 1

Status
Not open for further replies.

treadhead

MIS
May 10, 2001
4
US
Help !!

In a new assignment as of May 9, I now own Clipper applications. Of course I have very limited experience using Clipper. I have a user request to extract memo data into a text file or a Word doc and don't know how to do it. If anybody can give me advice I would appreciate it.
 
Three options spring to mind...


1. Is there a print routine? If so, you could redirect it to a file using Windows.

2. If this is a one-off request, use FoxPro or similar to open the database file, view the memo field and copy and paste using the Windows clipboard.

3. If this will be needed often, would it be possible to include an export routine within the program, i.e. do you own the program source code and can change it?

 
treadhead,

Here's the programming code that will do it:

1 - find the correct record in the database by using a SEEK command.
2 - store the memo field into a variable: cText := DATA->MEMO (use the appropriate database name and memo field name)
3 - save the text information to a text file: MEMOWRIT("textfile.txt", cText)

There are lots of ways of accomplishing what you want, but this should work just fine for you. The FCREATE() and FWRITE() and FCLOSE() functions could also be used, but MEMOWRIT() does the same thing with only one function.

Kelly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top