| Subject |
Print Entryfield Editor |
| From |
Norman Snowden <duluth@msn.com> |
| Date |
Fri, 22 Apr 2022 13:28:32 -0400 |
| Newsgroups |
dbase.getting-started |
Below is part of the code I used to successfully complete Editor2 and show the
results on screen. However, I also want to print the results. When I try to print it, an
Error message comes up, " Can't find File plot_occupation.txt".
I checked in the program Folder and do find plot_occupation.txt there. If clicked on, it prints out with Notepad and can be sent to the printer for printing. Must be something with word. application?
I realize the entire code would be necessary to find the problem. However, any comments would be appreciated. Thanks, Norman
Asort(Occup,1)
form.editor2.value = ''
fFile = new file()
fFile.create('plot_Occupations.txt')
crlf = chr(13)+chr(10)
form.editor2.value += " " + crlf
form.editor2.value += ' ' + ' OCCUPATIONS' + ' ' + crlf
form.editor2.value += " -------------------------------------------------" //no crlf
fFile.puts(form.editor2.value) //fFileputs() adds crlf in file automatically
form.editor2.value += crlf //add crlf to editor contents for proper display
function PUSHBUTTON11_onClick()
form.entryfield1.value = set('directory')+'\plot_occupation.txt'
oWord = new oleAutoclient("word.application")
oWord.ChangeFileOpenDirectory( set('directory')+'\')
oWord.documents.open("plot_occupation.txt",false, true )
oWord.activeDocument.printOut()
oWord.quit( 0 )
release object oWord
oWord = null
return
|
|