Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement