Solved

How to capture user actions on MS Word Command Bars, Menus, Dialogs.

Posted on 2008-10-30
2
303 Views
Last Modified: 2013-11-25
How to capture user actions on Microsoft Word Command Bar, Menus, Dialogs.?

It is possible as Adobe Captivate does a pretty good job in capturing/logging the user actions.
For example, it can identify that user selected the Home tab and then the user clicked the launch of Font Dialog.
It can also determine which buttons in the Font Dialog are clicked.

Is there any interface/COM Interface that Microsoft Office provides to the developer which helps in logging user actions.
0
Comment
Question by:ashugarg00
  • 2
2 Comments
 

Accepted Solution

by:
SunnyShahMca earned 500 total points
ID: 22839936
There are two possible ways I can think of:
1.  A. Call GetTopWindow to get the topmost window on the desktop.  Thats where the mouse must have been clicked.  Identify the class name of this window by GetClassName.
B.  Depending on the class name, you know if the class supports COM automation.
C. Get the IDispatch pointer to this window by GetActiveObject, and from here you can do pretty much what you want.  This will work for many applications including all of MS Office.  Unfortunately, it is very hard to make it work for IE, because you have to do extra work ('Helper Objects') in order to get a valid pointer from GetActiveObject for an IE window.

2.  Some simple applications use ordinary controls that you can just get hold of an grab the text.  The obvious example is notepad - just take a handle to the window, enumerate its child windows and get hold of the edit box.
0
 

Expert Comment

by:SunnyShahMca
ID: 22855724
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question