PC Review


Reply
Thread Tools Rate Thread

Adding "fit to" into current print code

 
 
J.W. Aldridge
Guest
Posts: n/a
 
      9th Apr 2008
I have a code that works perfectly except the image prints too small.
I have figured out the trick to change the size of the printout, but
need to implement this in my current procedure. I tried just dropping
it in but it didnt quite work, so either I am putting it in the wrong
place, or I need some additional code somewhere.


My current code:

Sub SetPrtAr_BigTest()
Dim lLastRow As Long
lLastRow = Range("I65536:K65536").End(xlUp).Row
Orientation = xlLandscape
ActiveSheet.PageSetup.PrintArea = Range("a6:N" & lLastRow).Address
End Sub


Piece I need added:

..FitToPagesWide = 1
..FitToPagesTall = 999


Thanx.
 
Reply With Quote
 
 
 
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      9th Apr 2008
If you type FitToPagesWide (for example) into the Immediate window and, with
the cursor touching any part of it, press F1, you will be taken to the help
page for that property. On that page is an example of it (and
FitToPagesTall) being used along with some other useful information.

Rick


"J.W. Aldridge" <(E-Mail Removed)> wrote in message
news:5977dca7-6d6a-4802-a2d3-(E-Mail Removed)...
>I have a code that works perfectly except the image prints too small.
> I have figured out the trick to change the size of the printout, but
> need to implement this in my current procedure. I tried just dropping
> it in but it didnt quite work, so either I am putting it in the wrong
> place, or I need some additional code somewhere.
>
>
> My current code:
>
> Sub SetPrtAr_BigTest()
> Dim lLastRow As Long
> lLastRow = Range("I65536:K65536").End(xlUp).Row
> Orientation = xlLandscape
> ActiveSheet.PageSetup.PrintArea = Range("a6:N" & lLastRow).Address
> End Sub
>
>
> Piece I need added:
>
> .FitToPagesWide = 1
> .FitToPagesTall = 999
>
>
> Thanx.


 
Reply With Quote
 
J.W. Aldridge
Guest
Posts: n/a
 
      9th Apr 2008
Thanx. But I know how to do it that way. I just need to automate the
process because I dont have time to teach/show everyone else how to.
So, if I could just ammend the code to :

(1) self adjust the print area by this criteria -
Range("I65536:K65536").End(xlUp).Row ;

(2) set to landscape

(3) collate the pages (if more than one);

(4) adjust the "fit to" so that each page doesnt not come out small,
but rather large enough for my grandma to read on a semi-bad eye day.

I even found this code that seemingly works, but just need to self-set
the print area and allow for more than one page.

Sub test()
With ActiveSheet.PageSetup
.PrintArea = Selection.Address
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
.Orientation = xlLandscape
End With
ActiveSheet.PrintOut preview:=True
End Sub

Thanx
 
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
Field Names: "LongName", "ShortName", "Code", "Description","Comments" PeteCresswell Microsoft Access 2 25th Feb 2009 11:41 PM
How do I find out the current metrics value when "automatic metrics" is enabled ? "Route print" interpretation? Ken Philips Windows XP Networking 2 19th Jan 2008 06:11 PM
How do I find out the current metrics value when "automatic metrics" is enabled ? "Route print" interpretation? Ken Philips Windows XP Help 0 19th Jan 2008 01:14 PM
How do I change page range "All" to "current Pages" in print menu =?Utf-8?B?U2hpdg==?= Microsoft Word Document Management 1 4th May 2007 01:13 PM
"Print current page" should have a "+n pages" field. =?Utf-8?B?cmF3YWhvaG8=?= Microsoft Word Document Management 5 16th Nov 2006 03:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:22 AM.