PC Review


Reply
Thread Tools Rate Thread

Can't print only 1 page wide-what am I doing wrong?

 
 
Ed from AZ
Guest
Posts: n/a
 
      1st Oct 2007
I am using the following code to print out a worksheet on a landscaped
page. I want all the columns to fit across the width of one page;
rows can slip onto the next page. In my code, I set FitToPagesWide =
1, but it doesn't do what I think it should.

What am I dong wrong?

Ed


' Prints Sheet2 list
Set rngWork = wks2.UsedRange
With wks2.PageSetup
.Orientation = xlLandscape
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.PrintArea = rngWork.Address
.FitToPagesWide = 1
.CenterHeader = "&D"
.CenterFooter = "Page &P of &N"
.PrintTitleRows = wks2.Rows(1).Address
End With

wks2.PrintOut

 
Reply With Quote
 
 
 
 
JE McGimpsey
Guest
Posts: n/a
 
      1st Oct 2007
From XL/VBA Help ("FitToPagesWide" topic):

If the Zoom property is True, the FitToPagesWide
property is ignored.


So set

.Zoom = False

In article <(E-Mail Removed)>,
Ed from AZ <(E-Mail Removed)> wrote:

> I am using the following code to print out a worksheet on a landscaped
> page. I want all the columns to fit across the width of one page;
> rows can slip onto the next page. In my code, I set FitToPagesWide =
> 1, but it doesn't do what I think it should.
>
> What am I dong wrong?
>
> Ed
>
>
> ' Prints Sheet2 list
> Set rngWork = wks2.UsedRange
> With wks2.PageSetup
> .Orientation = xlLandscape
> .TopMargin = Application.InchesToPoints(1)
> .BottomMargin = Application.InchesToPoints(1)
> .LeftMargin = Application.InchesToPoints(0.5)
> .RightMargin = Application.InchesToPoints(0.5)
> .PrintArea = rngWork.Address
> .FitToPagesWide = 1
> .CenterHeader = "&D"
> .CenterFooter = "Page &P of &N"
> .PrintTitleRows = wks2.Rows(1).Address
> End With
>
> wks2.PrintOut

 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      1st Oct 2007
You should have all these commands:

.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False


--
Regards,
Tom Ogilvy


"Ed from AZ" wrote:

> I am using the following code to print out a worksheet on a landscaped
> page. I want all the columns to fit across the width of one page;
> rows can slip onto the next page. In my code, I set FitToPagesWide =
> 1, but it doesn't do what I think it should.
>
> What am I dong wrong?
>
> Ed
>
>
> ' Prints Sheet2 list
> Set rngWork = wks2.UsedRange
> With wks2.PageSetup
> .Orientation = xlLandscape
> .TopMargin = Application.InchesToPoints(1)
> .BottomMargin = Application.InchesToPoints(1)
> .LeftMargin = Application.InchesToPoints(0.5)
> .RightMargin = Application.InchesToPoints(0.5)
> .PrintArea = rngWork.Address
> .FitToPagesWide = 1
> .CenterHeader = "&D"
> .CenterFooter = "Page &P of &N"
> .PrintTitleRows = wks2.Rows(1).Address
> End With
>
> wks2.PrintOut
>
>

 
Reply With Quote
 
Ed from AZ
Guest
Posts: n/a
 
      1st Oct 2007
Thanks to both of you. I originally had Zoom = False, just before the
FitToPagesWide setting, but I thought the Help instructions meant that
if either of the FitToPages settings was active, then Zoom was
automatically false, and setting Zoom to a percentage would override
the FitToPages settings. Thanks for setting me straight.

Ed

On Oct 1, 11:36 am, Tom Ogilvy <TomOgi...@discussions.microsoft.com>
wrote:
> You should have all these commands:
>
> .Zoom = False
> .FitToPagesWide = 1
> .FitToPagesTall = False
>
> --
> Regards,
> Tom Ogilvy
>
>
>
> "Ed from AZ" wrote:
> > I am using the following code to print out a worksheet on a landscaped
> > page. I want all the columns to fit across the width of one page;
> > rows can slip onto the next page. In my code, I set FitToPagesWide =
> > 1, but it doesn't do what I think it should.

>
> > What am I dong wrong?

>
> > Ed

>
> > ' Prints Sheet2 list
> > Set rngWork = wks2.UsedRange
> > With wks2.PageSetup
> > .Orientation = xlLandscape
> > .TopMargin = Application.InchesToPoints(1)
> > .BottomMargin = Application.InchesToPoints(1)
> > .LeftMargin = Application.InchesToPoints(0.5)
> > .RightMargin = Application.InchesToPoints(0.5)
> > .PrintArea = rngWork.Address
> > .FitToPagesWide = 1
> > .CenterHeader = "&D"
> > .CenterFooter = "Page &P of &N"
> > .PrintTitleRows = wks2.Rows(1).Address
> > End With

>
> > wks2.PrintOut- Hide quoted text -

>
> - Show quoted text -



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shrink a form to print on one page wide Karen Microsoft Access 3 8th Apr 2009 05:43 PM
Macro: ajust the print of a range to 1 page wide/tall Snoopy Microsoft Excel Discussion 3 14th Aug 2007 02:12 PM
Setting the print area in page set up to print 1 page wide by 2 pages tall EA Microsoft Excel Discussion 3 13th Jul 2007 05:44 PM
Setting the print area in page set up to print 1 page wide by 2 pages tall EA Microsoft Excel Misc 2 12th Jul 2007 08:39 PM
How do I print an extra wide access page =?Utf-8?B?RVA=?= Microsoft Access 6 1st Feb 2006 03:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:41 AM.