The cursor doen't have to be anywhere particular - it just happens to be put there by the adding of the table.

There is nothing I can see in that document that should stop the code working. From what you say it sounds like something either in Notes or environmental is the cause, but I have no idea what. Without Notes, I can't check much more out, I'm sorry.