Questions tagged [page-setup]
43 questions
3
votes
1 answer
Excel VBA: getting zoom level corresponding with FitToPageWide
I am trying to build a macro in Excel which loops through all worksheets, and based on the largest sheet, sets the zoom level to the same level for all worksheets so they all fit on one page but have the same scale (which is needed in printing).
I…

user3029330
- 43
- 3
2
votes
3 answers
Use VBA to copy an image from headers/footers of one sheet to another
I need to write a VBA code to copy a company logo in the headers/footers of one excel sheet to another sheet in another workbook. Any ideas?
Jill
2
votes
0 answers
VBA Runtime error '1004' code on formatting page footer/header
When I run the VBA code to set-up and format the footer for the Excel page, I get 1004 Runtime error - "Unable to set the CenterFooter property of the PageSetup class". The code is below:
With Sheets("Letter").PageSetup
.LeftFooter =…

J.Hun
- 21
- 4
2
votes
1 answer
OpenXML Pagesetup (PrintOptions, pageMargins, Orientation, headerfooter) Error
I have a c# program that produces formatted Excel reports. Due to the upgrade of Office, I converted the program to use Microsoft Excel 16 Object Library. All was fine except for the pagesetup class. Pagesetup class is no longer supported in the…

Carmen
- 23
- 2
2
votes
0 answers
Setting IE's page setup from application
I found the IE's page setup settings stored at:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup
But the IE's left margin value set within IE is 0.5 but the key value is 0.019690.
Which format does IE store those values and how…

Jack
- 16,276
- 55
- 159
- 284
2
votes
0 answers
Reg-Key for PageSetup on IE11
I want to change the Pagesetup on IE11 with a Regkey entry via GPO.
On a previous version from IE I have added the key via GPO to:
"HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup"
When I set the Regkey for IE11 on the same…

Thomas Lang
- 231
- 1
- 4
- 12
2
votes
1 answer
Remove header and footer when printing from WebBrowser control
I have a C# application that use MySql database. I built a report using HTML.
I fill string attribute with tags and send the content to a WebBrowser control in a new form.
The report appear correctly, but when I call print preview…

Minions
- 5,104
- 5
- 50
- 91
2
votes
0 answers
How to avoid runtime errors when accessing PageSetup property
Hi everyone I have a small question. I'm currently working on an excel program that will generate reports, format them and print them. I was trying to show my boss the program when excel gave me an error saying pagesetup class was not working (error…

Tolure
- 859
- 1
- 14
- 34
1
vote
1 answer
Page preferences dialog in WPF
I'm fiddling with adding the ability to output from a program I'm working on to both PDF and XPS. Initially both were just done via printers (pdf printer/xps writer) but I'd like to do it a little more directly.
The issue I've run into is that there…
Adam
1
vote
1 answer
VBA print line number and column letter in pdf document
So I am trying to print an Excel sheet. So far I got most of the stuff set up, but I can't get the line number nor the column letter working.
I tried a bunch of stuff like LineNumbering, PrintTitleColumns, but I think that's not what I am actually…

Buschmxnn
- 43
- 6
1
vote
4 answers
Programmatically printing directory of word documents... last file always skipped
I am having a problem when trying to programmatically print a directory of word documents. In this example, I am trying to print only the files with the "3_" prefix. The problem is that the file does not print unless there are two files with the…

jle
- 9,316
- 5
- 48
- 67
1
vote
0 answers
Not able to set the page properties of an excel sheet
i am not able to set the sheet properties of an excel workbook using c# code.
her is the code.
sheet.PageSetup.PaperSize = XlPaperSize.xlPaperA4;
sheet.PageSetup.Zoom = false;
sheet.PageSetup.FitToPagesWide = 1;
for eg even…

NIDHIN SANKAR
- 13
- 3
1
vote
1 answer
VBA statements for pagesetup only executed in debug mode
The following sub is supposed to prepare pagesetup for a PDF output.
For instance, if due to other attached printers the pagebrakes are messed up, the sub should fix it back to 1 page wide and 3 pages tall.
Sub adjustPB(ws As Variant, ps As…

Mike
- 40
- 6
1
vote
1 answer
Why does setting the width and height of pages to print not get applied?
I have this code to set various print options:
private void ConfigureByCustomerForPrinting()
{
_xlSheet.PageSetup.PrintArea = "A1:" +
GetExcelTextColumnName(
_xlSheet.UsedRange.Columns.Count) +
…

B. Clay Shannon-B. Crow Raven
- 8,547
- 144
- 472
- 862
1
vote
1 answer
Interop - prevent a table wrapping over two pages in Word
I am outputting multiple tables with a minimum of two lines of header information followed by 0 or several lines of data...
My problem is that sometimes the tables wrap over the end of the page.
How can I prevent this - is there a s property like…

Our Man in Bananas
- 5,809
- 21
- 91
- 148