Break on
$objWord = CreateObject("Word.Application")
? @ERROR
? @SERROR
$objDoc = $objWord.Documents.Add()
? @ERROR
? @SERROR
$objSelection = $objWord.Selection
? @ERROR
? @SERROR
$objWord.Visible = True
? @ERROR
? @SERROR
$objShape = $objSelection.InlineShapes.AddPicture(@ScriptDir+"\AEP.png", 0, 1)
? @ERROR
? @SERROR
$nul = $objShape.ConvertToShape()
? @ERROR
? @ERROR
;wdWrapSquare = 0
;wdWrapTight = 1
;wdWrapThrough = 2
;wdWrapNone = 3
;wdWrapTopBottom = 4
$objShape.WrapFormat.Type = 0 ;"wdWrapSquare"
? @ERROR
? @ERROR
$objSelection.TypeText("111")
$objSelection.TypeText(Chr(11))
$objSelection.TypeText("222")
$objSelection.TypeText(Chr(11))
$objSelection.TypeText("333")
$objSelection.TypeText(Chr(11))
$objSelection.TypeText("444")
;Sleep 10
;Quit word
;$objWord.Quit