I've added an image to a word document using powershell. How can I resize?
$Word = New-Object -ComObject Word.Application
$Word.Visible = $True
$Document = $Word.Documents.Add()
$Selection = $Word.Selection
$Selection.InlineShapes.AddPicture("$imagelocation")|Out-Null
$Selection.InlineShapes.Height = 50
$Selection.InlineShapes.Width = 50
But I get the following errors:
Exception setting "Height":
"The property 'Height' cannot be found on this object. Verify that the property exists and can be set."
Exception setting "Width":
"The property 'Width' cannot be found on this object. Verify that the property exists and can be set."