What you need to do is set up a little loop, sticking the thumbs in a table cell for each line, don't bother with any math to work out the number of slides you have, etc...
Here's the theory:
counter = 0
loop starts
if counter = 0 then start row and open cell, insert picture close cell
if counter = 4 then open cell, insert picture close cell, close row
else open cell, insert picture and close cell
counter = counter + 1
loop ends
All you have to do now is sort the code. I'll help if you want. I don't like doing the code for people, we all have to learn the basics and working on this will be fun.
Hope this helps...
🙂