Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Automation .... Landscape
Message
 
To
10/12/1999 12:40:38
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00301821
Message ID:
00301841
Views:
29
>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!!!!!

Hi Pamela,

Don't know about PrintTitleRows
but orientation line have to look like:

ObjExcel.ActiveSheet.Pagesetup.Orientation = xlLandscape

or

ObjExcel.ActiveSheet.PageSetup.Orientation = 2 && landscape

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform