Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Russell Hill
  Where is Russell Hill?
 Sydney
 Australia
 Russell Hill
 To: Khurram Tahir
  Where is Khurram Tahir?
 Karachi
 Pakistan
 Khurram Tahir
 Tags
Subject: RE: Fit to (1) pages wide by 1 tall
Thread ID: 228478 Message ID: 228596 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Microsoft Office Automation
Date: Wednesday, May 20, 2009 6:53:32 AM         
   


>
> Thanks for your reply
>
> I have tried the following but it not works
>
>
oXs.PageSetup.FitToPagesWide = 1
> oXs.PageSetup.FitToPagesTall = 1

>
> Q1. How can i get access to set Scaling options through VFP coding in page setup Form of Excel
>
>
>
>

Try again with:

.ActiveSheet.PageSetup.FitToPagesWide = 1
.ActiveSheet.PageSetup.FitToPagesTall = 1


For scaling, in your example you'd use:

WITH oExcel.ActiveSheet.PageSetup
     .....
     .....
     .Zoom = 92
     .....
     .....
ENDWITH

But get into the habit of recording a macro for each Excel task you want to automate. In this example, you'd go:

1. Record Macro
2. Do the necessary "File", "Page Setup", scaling stuff.
3. Stop recording.
4. Edit Macro and you'll see the VB code that you want to use in your automation.

Cheers,

Russell.

ENTIRE THREAD

Fit to (1) pages wide by 1 tall Posted by Khurram Tahir @ 5/19/2009 9:52:28 AM
RE: Fit to (1) pages wide by 1 tall Posted by Russell Hill @ 5/19/2009 2:11:41 PM
RE: Fit to (1) pages wide by 1 tall Posted by Khurram Tahir @ 5/19/2009 2:50:00 PM
RE: Fit to (1) pages wide by 1 tall Posted by tushar @ 5/19/2009 7:25:01 PM
RE: Fit to (1) pages wide by 1 tall Posted by Russell Hill @ 5/20/2009 6:53:32 AM
RE: Fit to (1) pages wide by 1 tall Posted by Khurram Tahir @ 5/22/2009 12:30:05 PM
RE: Fit to (1) pages wide by 1 tall Posted by Russell Hill @ 5/22/2009 1:45:33 PM
RE: Fit to (1) pages wide by 1 tall Posted by Derrick Bruce @ 5/20/2009 6:15:26 AM