See the question and my original answer on StackOverflow

In general, for UI automation to work, the application that is automated must run at same UAC level than the application that automates it.

So for example, if Excel is not ran as admin, the automating application must not run as admin, or if Excel is ran as admin, the automating application must run as admin, etc.