This is quite tricky but seems to be doable (successfully tested with CS6)
The idea is to apply “Wrap Around Object Shape” option to your icons instead of “Wrap Around Bounding Box”. So, if there’s no image, no wrapping either.
First create an object style for your icons frames. (You could also work with Wrapping options directly, but I find this way more handy).
Go to the Text wrap options, and set “Wrap Around Object Shape”. In my example below, I used .AI files so I set up “Same As Clipping”. Adjust options if necessary.
Now, follow the steps in the right order, because it’s a bit of a cheat:
- First Check Preview in your Data merge window: that’s very important!
- Create an image frame, place the variable by clicking on the image field in your Merge data window.
- Then apply the “Icon” Object Style previously created.
- Now, this is important: select your image frame and make sure the “wrapping” stroke does NOT appear. If so, Alt + click on the Object Style. It should disappear.
- Finally, just duplicate frames and assign other icons fields. I tested it, and it works for me.
Here’s the example:
Finally, this works but your text is now off-centred. We could find this not so aesthetic.
Here’s a trick to get same “padding” space on the left than on the right: the idea is to duplicate your icons, to place them on a layer that will be invisible (make sure the “Don’t wrap text while not visible” option is NOT checked) and set them left: