Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Hi,
Your code is correct but the only thing you are doing wrong is using the constants which are not defined in the Visual Foxpro.
Actually xlPortrait is having the value 1 and xlPaperFanfoldUS is having a value 39. So, if you run your code as following, it will not give you any problem.
--------------------------------------------------------
tmpsheet = GetObject('','excel.application')
XLApp = tmpsheet.application
XLApp.Visible = .t.
XLApp.WorkBooks.Add()
XLSheet = XLApp.ActiveSheet
* Setting Page setup degan LETTER 8 1/2 X 11 inch LANDSCAPE *
With xlsheet.PageSetup
.LeftMargin = xlapp.InchesToPoints(0.0)
.RightMargin = xlapp.InchesToPoints(0)
.TopMargin = xlapp.InchesToPoints(0.25)
.BottomMargin = xlapp.InchesToPoints(0.25)
.Orientation = 1
.PaperSize = 39
EndWith
-------------------------------------------------------
---
Raj
Précédent
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