Information générale
Catégorie:
Codage, syntaxe et commandes
>I am trying to automate some excel printing within my VFP application. I am able to print ok, but I need the spreadsheet to be landscape and to always print rows 1 and 2 on each page.
>
>I have included the necessary .h files (office97.h and xl97cons.h). Within the xl97cons.h, it denotes xlLandscape as a constant. Once my code gets to the following lines, I get a runtime error (invalid number of parameters):
>
>ObjExcel.ActiveSheet.Pagesetup.Orientation(xlLandscape)
>ObjExcel.ActiveSheet.Pagesetup.PrintTitleRows("1:2")
>
>
>The error occurs when trying to make landscape. I am not sure if the PrintTitleRows syntax is correct.
>
>Please HELP!!!!!
Pamela,
try
ObjExcel.ActiveSheet.Pagesetup.Orientation = xlLandscape
HTH
Oleg
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