Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PrintPreview on MS-Word
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
PrintPreview on MS-Word
Divers
Thread ID:
00671045
Message ID:
00671045
Vues:
43
Hi,

When I want a PrintPreview of a MS-Excel worksheet I do this:

loExcel = createobject("Excel.Application")
loExcel.WorkBooks.Open("Test.Xls")
loExcel.Visible = .t.
loExcel.ActiveWindow.SelectedSheets.PrintPreview
loExcel.Quit

Then, after I see the preview, I click on Close buttom, and only after this the Quit line will be processed. It´s all right, here!


But with a MS-Word documento I do:

loWord = createobject("Word.Application")
loWord.Documents.Open("Test.Doc")
loWord.Visible = .t.
loWord.Documents.ActiveDocument.PrintPreview
loWord.Quit

Here´s the problem: I can´t view because there isn´t pause between the .PrintPreviw line and the .Quit line.

How can I force it to wait?

Thanks.
Marcio Gomes Gonçalves
Niteroi-RJ-Brasil
gomes@metha.com.br

Paz e Bem!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform