Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding a Page Break In Excel
Message
 
To
08/01/2001 14:40:53
Todd Wolfe
Certified Marketing Services
Kinderhook, New York, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00459740
Message ID:
00460755
Views:
13
What kind of error message did you receive?

Create a file c:\xxx.xls and try this:
*------------------
oExcel=CreateObject("excel.application")
WITH oExcel
.Workbooks.Open("C:\XXX.XLS")
.Range("A2").Value="A2 on Page1"
.Range("D3").Value="D3 on Page 2"
.Range("F5").Value="F5 on Page 3"
.ActiveSheet.Columns(3).PageBreak = -4135
.ActiveSheet.Columns("E").PageBreak = -4135
ENDWITH

oExcel.ActiveWorkbook.Save
oExcel.Workbooks.Close
oExcel.quit
RELEASE oExcel
*---------
Try this sample, and let me know whether it works for you.

Best Wishes

>I was unable to get this to work? Is there another way, or one that someone >could elaborate a bit on?
Previous
Reply
Map
View

Click here to load this message in the networking platform