General information
Category:
Coding, syntax & commands
Title:
Printing Output Window w/o quitting Foxpro
Hello,
Please forgive my ignorance but I'm completely new to the Thread and I'm at best a novice programmer. I'm trying to do something simple with no luck.
I've been writing comments in a foxpro program to an output window and then printing the window to a txt file. At the end of my program I try to email the txt file using OLE automation with Lotus Notes. Everything works properly except I can't get the output window to close, saving the updated txt file until I quit foxpro. I either need to find a way to close the window, saving the txt file without quitting, or I need to figure out how to queue one foxpro program (emailing the txt file) to run after the completion of another program (writing the output txt file) or I need a different (simple) way of creating the output file. A few critical lines of code are as follows:
* Establish the output window & txt file
Define Window output FROM 2,1 TO 30,95 TITLE 'Output'
Activate Window output
Set Printer On
Set Printer To MyOutput.txt
... code
? 'Printing stuff to output window & MyOutput.txt
... code
Print Window output
Close All
Quit
* I can't seem to get MyOutput.txt to complete updating & become Available
* until Foxpro Quits. Is there a way?
* Code to send email
loNotes=CreateObject("Lotus.Notessession") && Create Lotus Notes Session
...
loRichTextItem=loDoc.CreateRichTextItem("Attachment")
=loRichTextItem.EmbedObject(1454, "", 'MyOutput.txt')
Thanks,
Justin
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only