Use UIAVerify to look at the UIA tree of your application. Looking at your code, I suspect you're not retrieving the element you think you are. If the 'Open' element is a button, it should support the Invoke pattern.
Alternatively, you are opening a dialog and then immediately searching for a sub element of that dialog. It is possible that you are running into a reliability issue here where the UIA tree is still being created for that dialog. To check for this, add a sleep for one second and see if that resolves your issue. If this is the case, look into UIA structure changed events. Those events will let you synchronize your UIA test code against changes in the UIA tree.