Quantcast
Viewing all articles
Browse latest Browse all 585

Getting the entire screen region of a page in print preview in Microsoft Word

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:

  1. Word window (ClassName = OpusApp)
  2. Pane (ClassName = _WwF)
  3. Pane (ClassName = _WwB)
  4. Document (ClassName = _WwG)
  5. 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)?

Image may be NSFW.
Clik here to view.


Viewing all articles
Browse latest Browse all 585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>