Hi! I’m trying to iterate all the shapes (of type .msoTextBox) of my word document and change the Fill of all shapes to an UserPicture. I know to to do it in VBA but I’m new to the apose product and have no idea where to start, can you help me please?
That’s the code in vba:
Dim picname As String Set objShapes = ActiveDocument.Shapes For i = objShapes.Count To 1 step -1 if objShapes(i).AlternativeText = "*SIGNATURE*" Then picname = Pathapp & Application.PathSeparator & "FICS" & Application.PathSeparator & "SIGN" & FORMAT(sgnnumber,"00000") & ".bmp" if FileExists(picname) Then with objShapes(i) .Fill.UserPicture(picname) .TextFrame.TextRange.Text = "" .Line.Visible = False end with Else objShapes(i).Delete End if End if Next i