MS word picture format recolor with vba

48 views Asked by At

how to change color with vba for picture inlineshape code

Public Function imagetransform()
    For Each singleLine In ActiveDocument.Paragraphs
      If singleLine.range.InlineShapes.Count > 0 Then
        Dim shp4d1 As InlineShape
        Set shp4d1 = singleLine.range.InlineShapes(1)
        shp4d1.Select
        End If 
  Next singleLine
End Function

enter image description here

how to achieve this with vba macro?

1

There are 1 answers

0
Eugene Astafiev On

Unfortunately not all functionality available in the Word object model which is available on the ribbon via Fluent UI (aka Ribbon UI). The gallery control provides a basic functionality which doesn't allow selecting the required item programmatically. However, you may try to use Windows API (Accessibility API) to automate the UI for that.