The best practice for UI Automation Testing is to do as little as possible. UIs change frequently, which means you're constantly having to update your automation. It's generally preferable to structure the product code in a way which allows automated testing without UI Automation.
That said, you can't always get rid of UI Automation. You mention office so I'm assuming you're coding for Windows and using .Net. I do quite a bit in my current job. Here are some of the things I've learned.
1) Look at the UIAutomation libraries which were introduced in .Net 3.0. They provide an extensive and fairly simple to use library for automation. (http://msdn.microsoft.com/en-us/library/ms753107.aspx)
2) Download UISpy (http://msdn.microsoft.com/en-us/library/ms727247.aspx)
3) Make your product's UIs Automatable.
3a) If it's WPF put AutomationIDs on everything.
3b) Try to create distinctive control and window class names (UI Class names, not source code class name). If you don't know what I mean, load up UI Spy and start looking at windows. Notice how many windows across different apps have a class name of #32770. This is the class name for a Windows Dialog Box. Any window which extends the dialog and doesn't set it's own name, defaults to this. This causes all sorts of grief from an UI Automation standpoint.
4) Avoid Thread.Sleep() statements. Try to use Waiters (see UIAutomation docs) instead.
5) NEVER mix the test code with the UI Automation code. Create separate libraries to perform the UI Automation. Call these libraries from your tests. When the UI changes, this will make it much easier to update the automation.
6) Always register a listener for a UI Event before performing the action which would cause the event to fire. In practice, this means you'll be working with threads.
6a) Example: don't start waiting for a Window Opened event after you have clicked a button to open the window. The window may open before the waiter is registered and never get the event.
7) Never assume the window that just opened is the one you want. All sorts of window may open unexpectedly in Windows.
I could go on more, but this is getting a bit long.