How do I know if the Office Clipboard collection is included?

I want to know if Office clipboard collection is enabled. This is a clipboard panel that saves the last 24 clipboard data. In Office 2007 and 2010, you get it by expanding the clipboard area on the Home ribbon, and in Office 2003 you can open it from the taskbar area and select the clipboard from the menu.

I have an Office plugin.

Although I make all kinds of API connections (using IAT), I am looking for the simplest solution.

  • My initial idea was to look for a window with the title: "Collect and Paste 2.0" (test yourself with Spy ++), with various Windows classes (for example, in Word it's bosa_sdm_msword). However, users can check "Build without showing the Office clipboard" and restart Office. At this point, Office will collect data without any signs in the window.

  • I look at the registry key: Software \ Microsoft \ Office \% d.0 \ Common \ General \ AcbOn. This is cool, but this entry is not saved until the user logs out of Office. Therefore, users can open another application, enable the collection, close the window.

  • Office clipboard creates an icon in the notification area. See Question: How to get a list of notification area icons? . Unfortunately, this question has not received an answer to this work. If you know the answer for this, answer here or to this question (you will get +1 twice!)

As I said, I enter the application process and I can intercept everything that has an export symbol, but I would like to minimize the impact on the application. For example, intercepting a message or subclassing a window will affect the performance (and in some cases stability) of an Office application.

Office 2003 has a window with a class named ("ActiveClipboard"), but I cannot find it in 2007 and 2010. On the other hand, I see WM_USER + 2304, which I do not know what it is.

Has anyone come this way? Any hint?

0
winapi ms-office reverse-engineering
source share
1 answer

Answering my own question:

As far as I can tell, Office does not have any event or API in the object model to tell you if Office is going to clipboard. However, a combination of these two methods works for me:

  • List all the windows in the system and search for a window with the following attributes (class name / name, respectively):

    Word 2010: "bosa_sdm_msword", "Collect and Paste 2.0" Word 2003: "bosa_sdm_Microsoft Office Word 11.0", "Collect and Paste 2.0" Word 2007: "bosa_sdm_Microsoft Office Word 12.0", "Collect and Paste 2.0" Excel (all): bosa_sdm_XL9 "," Collect and insert 2.0 "PowerPoint (all):" bosa_sdm_Mso96 ", L" Collect and insert 2.0 "

    If such a window exists, it means that Office is collecting clipboard data.

  • Search the registry key: HKCR \ Software \ Microsoft \ Office \ 14.0 \ Common \ General \ AcbOn (REG_DWORD). A value of 1 will tell you well that Office is collecting data.

0
source share

All Articles