Welcome to Excel Forum!
I could not find a reference to Application.PrintCommunication in Excel 2007. When I use it I get the same error you are describing. An online search shows it in Excel 2010 but your profile says 2003. Did you copy that code from someplace intended for Excel 2010? Not sure why you want to do that anyway. It is not necessary to turn off printer communication to change page setup.
I have several other pieces of advice:
First, forum rules require that code be enclosed in code tags. See my signature below.
Second, when debugging macros it helps to know exactly what line triggers the error. When the error occurs, do you see what line it's stopping on? If not you may want to run it in the VBA environment so you can step through it with the debugger.
Third, it looks like your code was generated by the macro recorder. It certainly works, but the macro recorder will generate a line of code for every possible attribute, not just the ones you actually set. What you describe that you need can be done by this Subm which worked for me:
instead of everything between the With and End With.
Bookmarks