Set print width to page width in VBA

IF I set the width, e.g.

ActiveWorksheet.PageSetup..FitToPagesWide = 1

It automatically makes it 1 page tall, not good on long sheets, how do
I set it to scale 1 page wide and however many pages tall?
-- 
A)bort, R)etry, I)nfluence with large hammer.
0
Trevor
10/25/2003 6:37:42 PM
excel 39879 articles. 2 followers. Follow

2 Replies
551 Views

Similar Articles

[PageSpeed] 3

I recorded a macro when I did it manually.  These are the lines that I'd keep:

    With ActiveSheet.PageSetup
        .Zoom = False
        .FitToPagesWide = 1
        .FitToPagesTall = False
    End With



Trevor Best wrote:
> 
> IF I set the width, e.g.
> 
> ActiveWorksheet.PageSetup..FitToPagesWide = 1
> 
> It automatically makes it 1 page tall, not good on long sheets, how do
> I set it to scale 1 page wide and however many pages tall?
> --
> A)bort, R)etry, I)nfluence with large hammer.

-- 

Dave Peterson
ec35720@msn.com
0
ec35720 (10082)
10/25/2003 7:43:05 PM
Trevor,

Keep in mind that FitToPages proportionally (height and width) scrunches the
print until it gets to your 1-page-wide specification.  This will result in
whatever height the shape of the worksheet provides. Excel limits the print
to either the width or the height limits you specify -- it doesn't
simultaneously re-shape the print to the height AND width your specify.

Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"Trevor Best" <bouncer@localhost> wrote in message
news:0iglpvo2meh9n0lcc8bfkilh2iop09r98d@4ax.com...
> IF I set the width, e.g.
>
> ActiveWorksheet.PageSetup..FitToPagesWide = 1
>
> It automatically makes it 1 page tall, not good on long sheets, how do
> I set it to scale 1 page wide and however many pages tall?
> -- 
> A)bort, R)etry, I)nfluence with large hammer.


0
nowhere8060 (363)
10/26/2003 2:46:22 PM
Reply:

Similar Artilces:

Web Page
Help! I am making a school web page using MS Publisher. When I try and preview my page, it only shows up on the left 1/3 of the screen. How can I see it as a full web page? Even when I press Full Page, it only shows up as part of the screen. After managing to set up OE-QuoteFix on his new PC, Ed reads a message from Lindsay <olsenl@calistoga.k12.ca.us>... > I am making a school web page using MS Publisher. When I > try and preview my page, it only shows up on the left 1/3 > of the screen. How can I see it as a full web page? > Even when I press Full Page, it only shows up...

Saving Toolbar Settings
This is my second post for the same subject. MSOL 2003 running on XP Pro Logged in as admin Open OL2003, arrange toolbars the way I want them, close and when I re-open they seems to revert to some default settings. Does anyonce know how to "save" changed Toolbar settings? Randy Rename Outcmd.dat to .old with Outlook closed. Next time you open Outlook, you can create all of your toolbars, arrange them as you like per folder. Close Outlook and copy the Outcmd.dat file you created when you recustomized the toolbars. Save this in a safe place. Whenever you add customizati...

How do I set end-of-range to #rows from beginning
Specifically, I am creating a chart that will have a breadth (# data points) based on a variable (value of a cell). Start point is always the same. For instance, a table is created based on a formula. The chart should stop when values in the table reach a certain value, but this could be 20 or 200 datapoints (20-200 rows). I know how many datapoints should be included, but not how to terminate the graph based on this number. I would prefer to do this without VBA, as I am not particularly proficient, but will if the only way. Hi, It would be nice to see some sample data, with a...

Set Focus Assistance Needed Urgently
Need some assistance on getting this coding to work right on this form. Basically, if the location and date are already in the SQL table, the 'Date1' and 'Location' fields need to be cleared on the form and the focus be in the 'Location' field. Here's my latest (but obviously not greatest) code which is giving a RunTime 2108 error 'Save the field before you execute the GoToControl action... or the SetFocus method.' Thanks so much in advance! I must also confess that I have posted this to a couple other groups a few days ago but never got an answer. P...

Printing #2
I am right now developing a software that have an option to print a bill.Bill ofcourse needs specific structure.How can get it done.My software needs to get values from a database and the print it.I am able to get values from the database and display it in a dialog.Now i want to print this value.How can i do it.Thaks in advance.Send me the code if you have .Thanks. jeevan jeevan, Take your pick: http://www.codeproject.com/printing/ Johan Rosengren Abstrakt Mekanik AB "Jeevan" <fenn_j@rediffmail.com> a �crit dans le message de news:eqNgcR$aEHA.3684@TK2MSFTNGP09.phx.gbl....

print a long list with 2 columns
I have one long column of data. Is there some way to have it print out in 2 "columns" per page? Like in Word, if I have a long list, I can set it to have 2 columns to accomplish this. Any similar Excel features? Bucky, have a look here for a way to do it, http://www.mvps.org/dmcritchie/excel/snakecol.htm If you're not familiar with macro's, see "Getting Started with Macro and User Defined Functions": here http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Paul B Always backup your data before trying something new Please post any response to the newsgroups...

How do I set my sent items folder so that it doesn't delete mails.
Currently my outlook deletes sent items automativcally. I want to set it up so that it never delete any of the sent items. Thanks, -Ajay "Ajay Patel" <Ajay Patel@discussions.microsoft.com> wrote in message news:16684B53-C258-4A87-A5D6-23EB256C1E5F@microsoft.com... > Currently my outlook deletes sent items automativcally. I want to set it > up > so that it never delete any of the sent items. > How do you mean "deletes" them? are you using mcafee? I understand it will clean up old mail for users. -- Diane Poremsky [MVP - Outlook] Need Help with C...

File Print preview not working in existing code while compiling VS
I have some code which does some printing.It seems to work when you compile and run in visual studio 6 .While compiling and running in VS 2005 and clicking on the File print preview menu displays nothing.It just displays the original main frame window. In the Main app file the initinstance method is displayed as CSingleDocTemplate* pDocTemplate; pDocTemplate = new CSingleDocTemplate(IDR_MAINFRAME, RUNTIME_CLASS(CDpqwinDoc), RUNTIME_CLASS(CMainFrame), RUNTIME_CLASS(CDpqwinView)); AddDocTemplate(pDocTemplate); ...... ...

Paste a print screen in Outlook Web Access
A user of mine said they were previously able to press the print screen key, then past that snap shot into the body of Outlook Web Access 2003 email, using IE7. I never used it so I tried and saw i was unable to do so in OWA, try to right click with the mouse in the body and no paste button. They did like to print screens and paste in the body of a new mail when needed. We use Exchange 2003 Enterprise. Does anyone know if this is possible, and how ? Nothing changed on my end --- Thanks, Bob It will only work if you use IE, not firefox or other browsers since HTM...

Using macro for page break
How can we use a macro to insert page breaks every 25th line? Please help. -- Sara Sara, If your row height is consistent, you may be able to get the same result by raising the bottom margin. File - Print Preview. Turn on the Margins button. Drag the bottom margin (the upper one at the bottom -- the other is for the footer) up until it prints only 25 rows. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Sara" <Sara@discussions.microsoft.com> wrote in message news:ADF97304-65AE-47A7-A587-4EA7E78B1685@microso...

Print Contacts
Is there a way of printing a list of headers only in contacts and not all the address, tel#, fax info with it? TIA Geoff ...

How do I make a number have leading zeros to fill width of cell?
I am trying to format existing data so that instead of being a set amount of digits, say 2 for example, it fills out the column based on its width, say 6, with leading zeros. Example - I have 55122 in a cell that has a width of 6, and I want it to say 055122. I know that changing the cell format to text and re-entering the data would fix this problem, but I want a way to change the data without re-entering it. You can use a custom format of 000000, but by width, do you mean that if the cell is widened it gets extra leading digits? -- HTH RP (remove nothere from the email address if m...

Word should alow you to print from the document map
It would be really good if you could right click on a section in the document map in MS word and click print. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/office/community/en-us/default.mspx?mid=0d2b2e2a-0c17-4023-9ea6-c394838fb6a6...

Regional setting problem
Hi, I have some problems with the localization, my computer is set to accept ',' (comma) as a decimal symbol but when I use the strtod, ecvt and even printf functions are still using the '.' (dot) as the decimal symbol in contrary to the documentation. can any one enlighten me? thanks in advance Iris Irisz wrote: >Hi, > >I have some problems with the localization, my computer is set to accept ',' >(comma) as a decimal symbol but when I use the strtod, ecvt and even >printf functions are still using the '.' (dot) as the decimal symbol i...

Cannot resize page in Word 2008... ?
Hello all, I'm having troubles resizing an A3-sized page to an A4 size. I started out in Notebook Layout mode, typing some memos and meeting minutes, and then I switched to Print Layout. The page size was a whopping A3 (for some reason, the printer default or perhaps Word's default is at this massive A3 size), so I tried bringing it down to A4 using the File - Page Setup command. In the Page Setup dialog, there is a dropdown selection for the page size. I changed it to A4, and clicked OK... but no dice, no deal. Page still remains at A3 dimensions, even though the dialog...

Setting up Outlook #7
My problem, somehow, got marked as "answered." That's not the case and I need clarification, Hal, on how to "start from scratch." Please excuse my ignorance in this matter. I don't know how to make Outlook work. Could it be that my computer is remembering that Outlook didn't work so well with my earlier version of Office?? Thank you for your kind help. Your origonal post was answered. Use the mail applet in the control panel to create a new profile and add accounts. Ensure you do not select exchange option. "D Wilson" <DWilson@discussions...

Problem setting up Displays for Contacts and GAL
We are running Exchange 2003 on a pure Windows Server 2003 domain with 100% XP Professional clients. Some of the workstations are running Office XP, some are running Outlook 2000. All workstations and servers have been fully patched to the most current updates via Windows Update and Office Update. Here's my problem. Let's say I have a Contact named "Joe Doakes" who has both a business and a personal email. Pursuant to the Microsoft design model, I keep only one Contact for both and, depending on the nature of the contact, I update the email field with the primary (business o...

Can you create a PRF file starting from the existing Outlook settings?
Outlook 2003: I have an Exchange server account, 4 POP3 accounts, and 3 HTTP accounts in my profile. I activate different combinations of these in Send/Receive, to monitor my accounts when I'm traveling. Back in office, I only use the Exchange Server account. Now I had to re-create the profile, and manually entering all the setup info for these accounts is quite a job (have to dig for different usernames, passwords and server names). I know one can use a PRF file to set these and other settings, so my question is: instead of manually entering all the stuff (e.g. using Microsoft's CIW...

exchange webbased page problem!
hello: i am using exchange 2003 on windows server 2003, the problem i am having is that some of the users webpage exchange excess doesnt work, although they can work perfectly on their office outlook . anybody got any idea ANWAR ADIL CCNA,MCP ...

display main column on next page
I need to display my main colum A "Name" and main(heading) row 1 (different data) address, city, state, zip, entry 1, entry 2, entry 3, paid early, paid late, total $,) display these on continuous pages. So, when I see my list of names, on page 1, it shows name, address, city, state, zip, etnry 1. Then it goes to page 2. I want the main column "name" to be first column on that page, then entry 2, entry 3, paid early, etc.... This is hard to explain. I did this once, but I don't remember how i did it! If anyone thinks they may have an idea, that would be wo...

Utility to ping CRM web pages to keep IIS cache fresh ?
Anyone know of a utility that runs every so often to ping web pages? Jeff Hi, try this one: http://blogs.msdn.com/joris_kalz/archive/2006/08/09/Caching-Tool.aspx "JHilbCRM" wrote: > Anyone know of a utility that runs every so often to ping web pages? > > Jeff ...

need to give user rights to enable mailbox and set quotas
What kind of access and where do I grant this type of access to a user that needs to enable exchange mailboxes in AD and set quotas You'll have to delegate control for account creation within ADUC and you'll have to apply Exchange permissions through Exchange System Manager. I'd suggest you give them Full Exchange Admin rights, within ESM, at the storage group level. If this is to much work backwards from this point until the user only has the rights you want them to. AM "tony" <none@none.com> wrote in message news:O6nX$lZOHHA.2232@TK2MSFTNGP02.phx.gbl......

printing sheet formulas
I need to print an Excel application which consists of many files that contain formulas, macros and add-ins. First, I want to print all formulas contained in a file (not the contents of the cells but the formulas) so that I can have a "blueprint" of the application as it is referencing multiple sheets and column names etc. I want to do this one file at a time. Then I want to examine the contents of the add-in that was created by the company many years ago aka not a Microsoft addin. Where can I go to see the contents and what the addin is doing? Everywhere I have been shows noth...

Page Header to show on 3rd page of reprt
I have created a report that has a sub report in a header of the main report. I would like the page header to show only at the end of the sub report records. I have set the page header property of the main report to "Not with Rpt Hdr". With this the page header starts on second page. How can I get the page header to start on 3rd or 4th page? Any suggestions on if this can be done, or how to get it done? Thanks in advance for your help. Nats On Mon, 6 Aug 2007 07:46:13 -0700, Natalie wrote: > I have created a report that has a sub report in a header of the main report....

How do I set my email account to automatically blind copy me
When an email is sent out how do I have it automatically send a copy back to me? "dbrite" <dbrite@discussions.microsoft.com> wrote in message news:7F84BAC1-01E5-4A15-9319-50198B7ACCA9@microsoft.com... > When an email is sent out how do I have it automatically send a copy back > to > me? Why would you want to? Outlook by default saves a copy of the sent email in your Sent Items... Gordon wrote: > "dbrite" <dbrite@discussions.microsoft.com> wrote in message > news:7F84BAC1-01E5-4A15-9319-50198B7ACCA9@microsoft.com... >...