Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Page layout in excel
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01426679
Message ID:
01426683
Vues:
76
This message has been marked as the solution to the initial question of the thread.
oWorkbook = oExcel.ActiveWorkbook
oSheet = oWorkbook.ActiveSheet
oSheet.PageSetup.Orientation = 2  && xlLandscape
>
>I create reports in excel programitically and it works excelently. However I would like to change the default print layout for one of them so that it automatically prints in landscape.
>
>oleApp = CreateObject("Excel.Application")
>OleApp.Visible = .T.
>OleApp.WorkBooks.Add
>msheet = "Sheet1"
>OleApp.Sheets(msheet).Select
>OleApp.Sheets(msheet).PrintPreview
>
>This code will open excel, create a new sheet and also attempt to do a print preview and give me the lines on the screen to show the boundries of the print page, but it defaults to portrait.
>~M
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform