I'm trying to identify the entire page view in print area. Using the UIAutomation framework, I can drill down when in Print Preview mode like so:
- Word window (ClassName = OpusApp)
- Pane (ClassName = _WwF)
- Pane (ClassName = _WwB)
- Document (ClassName = _WwG)
- Page (custom control with AutomationID = UIA_AutomationID_Word_Page_#)
Object #4 represents an area the entire width of the application (excluding scrollbars) the includes the page as well as an area of gray space (the red box)
Object #5 represents just the content on the page, excluding the margins. (the green box)
Is there a way to grab the object representing the actual page with the margins (the blue box)?