Header and footer being truncated in Excel 2010

ERIM

New Member
Joined
Sep 30, 2005
Messages
21
I have a VBA macro which extracts data and formats it for printing. To the print format I have added a left header containing a text string showing the description of the data, and a left footer which contains a reference number. I have also included in the right footer the current date and time (using &D and &T).

In print preview both the left header and left footer are being truncated. The left footer shows just three characers of the seven included, while the header chops five characters from the string of around 75. I have adjusted the font size to see if that would do the trick, but that wasn't successful. I have also created the headers in separate variables outside the print formatting and used them in the header format commands, but truncation still occurs.

I have only recently migrated to Excel 2010 and notice that the print formatting commands have been extensively extended. Is there a parameter in the new stuff that might explain the truncation?

Anyone out there had this problem and found the cure?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

bcole

New Member
Joined
Nov 16, 2012
Messages
1
Are you disabling PrintCommunication? If so, try enabling it for the lines where you are adjusting headers and footers, and then turning it off again for any other PageSetup operations. This resolved a similar issue I was having.
 

ERIM

New Member
Joined
Sep 30, 2005
Messages
21
Yes, I was disabling Print Communication at either end if the code relating to page set up. I've now commented out both statements, and this seems to have solved the issue. Many thanks for your help.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,263
Messages
5,769,111
Members
425,518
Latest member
seothaeng

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top