title: Output a New Line Character in a String to Word with Powershell
body: <p>I am authoring a docx file in Powershell and I am outputting using TypeText() to a Selection from a Word.Application object and TypeParagraph() for a new line and this is working fine.</p>
  
  <p>My question is how do I do a new line mid string?</p>
  
  <p>I will need both return and shift + return.</p>
  
  <p>Thanks in advance,
  Norman</p>
  
  <p><strong>EDIT:</strong>
  Here is a basic script.</p>
  
  <pre><code>$objWord = New-Object -comobject Word.Application  
  $objWord.Visible = $True 
  
  $objDoc = $objWord.Documents.Open("C:\Test\Template.docx")
  $objSelection = $objWord.Selection
  $a = $objSelection.EndKey(6, 0)
  
  $text = "Shift + enter that works`vThanks Dangph"
  $objSelection.TypeText($text)
  $objSelection.TypeParagraph()
  $text = "Enter that`r`nworks"
  $objSelection.TypeText($text)
  $objSelection.TypeParagraph()
  </code></pre>
  
  <p>While knocking the above up I have realised that the issue with `r`n that I had is actually an issue with Selection.Find.Execute. I will raise this as a separate question.</p>
  
  <p>So in short `v for shift + enter and `r`n for enter.</p>