>>I have a code that uses a macro, here is an example:
>>
>>
>>cPageMsgExpr = filetostr("MyTextFile.CFG")
>>=SendPageMessage( cPageNumber, "Order #" + alltrim(str(MYTABLE.ORDER_NO)), &cPageMsgExpr. )
>>
>>
>>The issue is with the variable cPageMsgExpr. An example of content of MyTextFile.cfg is as following:
>>
>>"trim(MYFIELD1) + ', ' + trim(MYFIELD2) + ', ' + trim(MYFIELD3)"
>>
>>The problem is that often times when I make changes of the content of MyTextFile.cfg (which I do using Notepad), the code breaks and I get error message "function missing )"
>>
>>I can't figure out what changes from change to change that causes this error.
>>
>>What should I do to this text file or to my macro to avoid this error message?
>>
>>Thank you for any suggestions.
>
>Make sure to remove CRLF from the file. Though I'm not certain what does SendPageMessage do and how does it work.
I thought about this CRLF too but wasn't sure how to remove it in Notepad or Edit (which I also use to edit this file). I guess I will have to run it through a VFP function that removes the CHR(13) and CHR(10).
Thank you for your suggestion.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham