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: 228501 # Views: 4 # Ratings: 1
Version: Visual FoxPro 9 Category: Microsoft Office Automation
Date: Tuesday, May 19, 2009 2:11:41 PM         
   


> Q. I want to set things for printing by automation
>
> 1)--Adjust to any size Automatically if Fit to page selected
>
> 2)--Fit to 1 Page wide by 1 tall (want to Select) how can i do this ?

Hi Khurram.

With any of this Office automation stuff one way to proceed is to record a macro in Excel and then step into "Edit" and have a look at the VB code which did what you wanted done.

Generally speaking the VB code is easy enough to adjust in order to conform to VFP syntax.

For example, I've just opened Excel and recorded a macro which demonstrates setting a page to 1 wide x 1 tall.



So basically all you have to do is cut and paste the VB code and find out the values of the constants.

So, for example, rather than .Order = xlDownThenOver you'd have .Order = 1.

You'll also need to change obvious things like "End With" to "Endwith".

Hope this helps.

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