It worked fine in my testing. One of the limitations of using Sendkeys is that the method is subject to timing issues that can cause the code to fail. You may get better results breaking it down into smaller chunks, like:
SendKeys "%{F11}%IM", True
SendKeys "Sub Demo(): MsgBox ""Hello"": End Sub", True
SendKeys "%{F11}%{F8}{ENTER}", True

I'll also reiterate the advice I gave before that you're making things unnecessarily complicated. SImply copying & pasting your Word tables into Excel would probably preserve most of the structure.