I am trying to change the color of all the arrows in a document to red. However, they keep changing to blue.
I tried this:
$shapes = $doc.Shapes
foreach ($shape in $doc.Shapes) {
if($shape.Name -like "Straight Arrow Connector*"){
$red = [System.Drawing.Color]::FromArgb(255,255,0,0)
$shape.Line.ForeColor.RGB = $red.ToArgb()
}
}
From the comment below, this ended up fixing my issue:
$shapes = $doc.Shapes
$color = [System.Drawing.Color]::Red
$red = $color.R + 0x100 * $color.G + 0x10000 * $color.B
foreach ($shape in $doc.Shapes) {
if($shape.Name -like "Straight Arrow Connector*"){
$shape.Line.ForeColor.RGB = $red
}
}