Results 1 to 3 of 3

Thread: filetostr not working

  1. #1
    Senior Member
    Join Date
    Jan 2016
    Posts
    160

    filetostr not working

    I would like to store some text from a .txt file to a memory variable. Below is what I did, but It does not work. invmemo still does not have the string from the text file. Any suggestions.

    ...
    ans = messagebox("Do you want to add a memo to the invoice?", 36, "ADD MEMO")
    if ans = 6
    memofilename=GETFILE('txt',"","",2,'Add a .txt file to memo')
    invmemo = filetostr(memofilename)
    endif
    ...

    Upon further testing. I copied the text out of the original file into another file and it worked fine.
    Last edited by rdd1963; 2016-04-03 at 00:37.

  2. #2
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,186
    Code:
    REPLACE invmemo with filetostr(memofilename)
    or

    Code:
    APPEND MEMO invmemo FROM memofilename
    Hank

  3. #3
    Senior Member
    Join Date
    Jan 2016
    Posts
    160
    Thank you.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us