VBA Word msoBringToFront problem with inserting image at cursor's position
Hi.
I've got this problem.
I've done vba script which is supposed to insert an image at the position of the cursor AND bring this image to front.
That's my solutions.
If I do this :
Code:
Sub Macro1()
Selection.InlineShapes.AddPicture FileName:="C:\wetude\s.png", LinkToFile:=False, SaveWithDocument:=True
End Sub
The image is inserted at the current cursor's position
And when I do this :
Code:
Sub Macro2()
With ActiveDocument.Shapes.AddPicture(FileName:="C:\wetude\f.png", LinkToFile:=False)
.ZOrder msoBringToFront
End With
End Sub
The image is brang in front, but at the top of the page.
How can I mix those two ? I tried everything my noob brain can do. Each time, it's not working.
Please help :)