Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing Output Window w/o quitting Foxpro
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Printing Output Window w/o quitting Foxpro
Divers
Thread ID:
00586507
Message ID:
00586507
Vues:
59
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
Fil
Voir

Click here to load this message in the networking platform