Hats off to Sylvyre for the animated objects macro here.  For some reason my search for a macro for this spell were fruitless, so I rolled up something a bit different.  Looking at this spell, I feel like it's crazy to take any thing other than tiny.  Sure you might take huge for some utility reasons (flying a big party for a short distance or raising them up to a high ledge, etc.).  For attacks, though, tiny is quite a bit more powerful.  So, I only created an attack macro for tiny that goes on a normal token.   The macro rolls twice for adv/disadv x 10, then provides a button to calculate damage.  This way, the DM can determine the number of hits.  The damage macro calculates the damage based on the DM-determined number of hits and critical hits:

The attack macro is in the Attack section of the Tiny AnimO NPC character sheet and called "Slam x 10":

01 - [[1d20+8]] | [[1d20+8]]
02 - [[1d20+8]] | [[1d20+8]]
03 - [[1d20+8]] | [[1d20+8]]
04 - [[1d20+8]] | [[1d20+8]]
05 - [[1d20+8]] | [[1d20+8]] 
06 - [[1d20+8]] | [[1d20+8]]
07 - [[1d20+8]] | [[1d20+8]] 
08 - [[1d20+8]] | [[1d20+8]]
09 - [[1d20+8]] | [[1d20+8]]
10 - [[1d20+8]] | [[1d20+8]]
[Calculate damage](~Tiny AnimO|damage)
the damage calc macro is in the same NPC character sheet in the "Attributes and Abilities" as an Ability named "damage":

&{template:dmg} {{rname=?{Number of Hits:|1, 1 Hit|2, 2 Hits|3, 3 Hits|4, 4 Hits|5, 5 Hits|6, 6 Hits|7, 7 Hits|8, 8 Hits|9, 9 Hits|10, 10 Hits}}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[[[?{Number of Hits:}]]d4+[[?{Number of Hits:}]]*4]]}} {{crit=1}} {{crit1=[[?{Number of Criticals:|1,1|2,2|3,3|4,4|5,5}d4]]}} {{dmg1type=bludgeoning}}   {{hldmg=hldmg}} {{spelllevel=spelllevel}} ammo=ammo {{charname=Tiny AnimO}}

This macro could be easily adapted to the other sizes objects.

It may not look beautiful on the NPC sheet, but I like teasing over the attack rolls with the players, some times adding flavor to the story, before getting into the damage.