title: Application.Printcommunication = True (results in error)
body: <p>I recorded a macro to auto-format a report in Excel 2010 that I send every week.  Part of the macro adjusts the Page Setup properties which includes changing the layout to Landscape and Legal size.</p>
  <p>I can run it on my computer because my printer has Legal size paper as one of the defaults.  However, some people have to manually adjust their printer before printing on Legal Size paper and they are getting an error.</p>
  <blockquote>
  <p>Run-time error '1004': Method 'PrintCommunication' of object '_Application' failed</p>
  </blockquote>
  <p>When I debug it highlights <code>Application.Printcommunication = True</code>.</p>
  <p>When I change to <code>Application.PrintCommunication = False</code> the macro doesn't fully format it the way it's built (e.g., Zoom stays at 100%).</p>
  <p>I thought a workaround might be to change their default printer to Nitro Pro (similar to Adobe Pro) prior to running the macro, but the error persists.</p>
  <pre class="lang-vb prettyprint-override"><code>Sub Auto_Open()
  '
  ' Macro2 Macro
  '
  
  '
      Application.PrintCommunication = False
      With ActiveSheet.PageSetup
          .PrintTitleRows = &quot;$1:$1&quot;
          .LeftMargin = Application.InchesToPoints(0.17)
          .RightMargin = Application.InchesToPoints(0.17)
          .TopMargin = Application.InchesToPoints(0.62)
          .BottomMargin = Application.InchesToPoints(0.48)
          .HeaderMargin = Application.InchesToPoints(0.17)
          .FooterMargin = Application.InchesToPoints(0.17)
          .PrintHeadings = False
          .PrintGridlines = False
          .PrintComments = xlPrintNoComments
          .PrintQuality = 1200
          .CenterHorizontally = True
          .CenterVertically = False
          .Orientation = xlLandscape
          .Draft = False
          .PaperSize = xlPaperLegal
          .FirstPageNumber = xlAutomatic
          .Order = xlDownThenOver
          .BlackAndWhite = False
          .Zoom = 60
          .PrintErrors = xlPrintErrorsDisplayed
          .OddAndEvenPagesHeaderFooter = False
          .DifferentFirstPageHeaderFooter = False
          .ScaleWithDocHeaderFooter = True
          .AlignMarginsHeaderFooter = True
      End With
      Application.PrintCommunication = True
      With Selection
          .HorizontalAlignment = xlGeneral
          .VerticalAlignment = xlBottom
          .WrapText = True
          .Orientation = 0
          .AddIndent = False
          .IndentLevel = 0
          .ShrinkToFit = False
          .ReadingOrder = xlContext
          .MergeCells = False
      End With
      With Selection
          .HorizontalAlignment = xlCenter
          .VerticalAlignment = xlBottom
          .WrapText = True
          .Orientation = 0
          .AddIndent = False
          .IndentLevel = 0
          .ShrinkToFit = False
          .ReadingOrder = xlContext
          .MergeCells = False
      End With
      With Selection
          .HorizontalAlignment = xlCenter
          .VerticalAlignment = xlCenter
          .WrapText = True
          .Orientation = 0
          .AddIndent = False
          .IndentLevel = 0
          .ShrinkToFit = False
          .ReadingOrder = xlContext
          .MergeCells = False
      End With
      Range(&quot;N2:O2&quot;).Select
      Range(Selection, Selection.End(xlDown)).Select
      Range(Selection, Selection.End(xlDown)).Select
      With Selection
          .HorizontalAlignment = xlGeneral
          .VerticalAlignment = xlBottom
          .WrapText = True
          .Orientation = 0
          .AddIndent = False
          .IndentLevel = 0
          .ShrinkToFit = False
          .ReadingOrder = xlContext
          .MergeCells = False
      End With
      With Selection
          .HorizontalAlignment = xlLeft
          .VerticalAlignment = xlBottom
          .WrapText = True
          .Orientation = 0
          .AddIndent = False
          .IndentLevel = 0
          .ShrinkToFit = False
          .ReadingOrder = xlContext
          .MergeCells = False
      End With
      With Selection
          .HorizontalAlignment = xlLeft
          .VerticalAlignment = xlTop
          .WrapText = True
          .Orientation = 0
          .AddIndent = False
          .IndentLevel = 0
          .ShrinkToFit = False
          .ReadingOrder = xlContext
          .MergeCells = False
      End With
      Range(&quot;A1&quot;).Select
      Range(Selection, Selection.End(xlToRight)).Select
      With Selection.Interior
          .Pattern = xlSolid
          .PatternColorIndex = xlAutomatic
          .ThemeColor = xlThemeColorLight2
          .TintAndShade = 0.599993896298105
          .PatternTintAndShade = 0
      End With
      Range(&quot;A1&quot;).Select
      Range(Selection, Selection.End(xlToRight)).Select
      With Selection
          .HorizontalAlignment = xlCenter
          .VerticalAlignment = xlCenter
          .WrapText = True
          .Orientation = 0
          .AddIndent = False
          .IndentLevel = 0
          .ShrinkToFit = False
          .ReadingOrder = xlContext
          .MergeCells = False
      End With
      Range(&quot;L1&quot;).Select
      Columns(&quot;B:B&quot;).ColumnWidth = 10.86
      Columns(&quot;D:D&quot;).ColumnWidth = 18.86
      Columns(&quot;E:E&quot;).ColumnWidth = 13.43
      Columns(&quot;F:F&quot;).ColumnWidth = 11.29
      Columns(&quot;F:F&quot;).ColumnWidth = 19.29
      Columns(&quot;G:G&quot;).EntireColumn.AutoFit
      Range(&quot;H1&quot;).Select
      ActiveWindow.SmallScroll Down:=-33
      Range(&quot;I1&quot;).Select
      Range(&quot;G1&quot;).Select
      Columns(&quot;H:H&quot;).ColumnWidth = 13
      Columns(&quot;I:I&quot;).ColumnWidth = 18.71
      Columns(&quot;J:J&quot;).ColumnWidth = 19.86
      Columns(&quot;K:K&quot;).ColumnWidth = 13.57
      Columns(&quot;L:L&quot;).ColumnWidth = 11
      Columns(&quot;L:L&quot;).ColumnWidth = 11.43
      Columns(&quot;M:M&quot;).ColumnWidth = 12.71
      Columns(&quot;M:M&quot;).ColumnWidth = 15.86
      Columns(&quot;N:N&quot;).ColumnWidth = 41.86
      Columns(&quot;O:O&quot;).ColumnWidth = 18.57
      Columns(&quot;O:O&quot;).ColumnWidth = 28.86
      Columns(&quot;O:O&quot;).ColumnWidth = 42
      Columns(&quot;L:L&quot;).ColumnWidth = 12.71
      Range(&quot;K2:L2&quot;).Select
      Range(Selection, Selection.End(xlDown)).Select
      Range(Selection, Selection.End(xlDown)).Select
      Selection.NumberFormat = &quot;$#,##0&quot;
      ActiveWindow.SmallScroll Down:=-30
      Columns(&quot;A:A&quot;).Select
      Selection.EntireColumn.Hidden = True
      Rows(&quot;1:1000&quot;).EntireRow.AutoFit
      Range(&quot;B1&quot;).Select
      Range(Selection, Selection.End(xlToRight)).Select
      Range(Selection, Selection.End(xlDown)).Select
      Selection.Borders(xlDiagonalDown).LineStyle = xlNone
      Selection.Borders(xlDiagonalUp).LineStyle = xlNone
      ActiveWindow.Zoom = 75
      With Selection.Borders(xlEdgeLeft)
          .LineStyle = xlContinuous
          .ColorIndex = 0
          .TintAndShade = 0
          .Weight = xlThin
      End With
      With Selection.Borders(xlEdgeTop)
          .LineStyle = xlContinuous
          .ColorIndex = 0
          .TintAndShade = 0
          .Weight = xlThin
      End With
      With Selection.Borders(xlEdgeBottom)
          .LineStyle = xlContinuous
          .ColorIndex = 0
          .TintAndShade = 0
          .Weight = xlThin
      End With
      With Selection.Borders(xlEdgeRight)
          .LineStyle = xlContinuous
          .ColorIndex = 0
          .TintAndShade = 0
          .Weight = xlThin
      End With
      With Selection.Borders(xlInsideVertical)
          .LineStyle = xlContinuous
          .ColorIndex = 0
          .TintAndShade = 0
          .Weight = xlThin
      End With
      With Selection.Borders(xlInsideHorizontal)
          .LineStyle = xlContinuous
          .ColorIndex = 0
          .TintAndShade = 0
          .Weight = xlThin
      End With
      Range(&quot;E2&quot;).Select
      ActiveWindow.SmallScroll Down:=-6
      ActiveWindow.LargeScroll ToRight:=-1
      With ActiveWindow
          .SplitColumn = 0
          .SplitRow = 1
      End With
      ActiveWindow.FreezePanes = True
      With ActiveSheet.PageSetup
          .LeftHeader = &quot;&quot;
          .CenterHeader = &quot;&amp;&quot;&quot;-,Bold&quot;&quot;&amp;12Weekly Staffing Summary Request &amp;D&quot;
          .RightHeader = &quot;&quot;
          .LeftFooter = &quot;&amp;D&quot;
          .CenterFooter = &quot;&amp;P&quot;
          .RightFooter = &quot;&amp;F&quot;
      End With
      
  End Sub
  </code></pre>