Trying to automate some things in Word and I'm not having any luck yet. What I would like to do is add an image and set the text wrapping to Square. I have seen some posts about InLine shapes not supporting text wrapping options but I did not find a definitive answer on that yet. Second thing I tried is recording a macro but text wrapping buttons are disabled when recording a macro.

Did anybody do anything like this? any help would be appreciated because I s*ck at COM scripting. The code below says everything worked fine but text wrapping is still set to InLine.

As said above InLine images do not accept text wrapping as they are seen as text by Word and you cannot just wrap text around other text. Shapes do accept text wrapping so inserting a shape and setting an image as fill material should do the trick. It is possible to insert an image as a shape and apply text wrapping to it like shown below. The extra testing was needed to see if it could be used in our outlook signature creation part of our logon script. I already have something running in production for this (see: this post) but the company branding is being updated so changes are needed. Took some time to figure it out but it works.

Below is some code to demonstrate how it works. I hope it might be useful to others in the future.

As a side note, I used .gif images to prevent Word from resizing the image as it does with .png and .jpg images for example.