title: Can page size and margins be set when sending data from Excel to Word?
body: <p>I have code like the following:</p>
  
  <pre><code>Dim blnNewApp As Boolean
  Dim wordApp As Object
  Dim wordDoc As Object
  Dim j As Long
  
  Set wordApp = GetObject(, "Word.Application")
  
  If wordApp Is Nothing Then
      Set wordApp = CreateObject("Word.Application")
      blnNewApp = True
  End If
  
  Set wordDoc = wordApp.Documents.Add()
  
  With ThisWorkbook.Sheets(strSHEET_NAME)
      For j = 2 To .Cells(.Rows.Count, "A").End(xlUp).Row
  
          strLineOfText = .Cells(j, "A").Text
      wordApp.Selection.TypeText strLineOfText
          wordApp.Selection.TypeParagraph
  
      Next j
  End With
  
  wordApp.Visible = True
  AppActivate wordApp.Caption
  </code></pre>
  
  <p>If I want to set the page size and margins in the Word doc that gets created how would I do that?</p>