0
votes

I am developing and Accessibility enabled Application. Application Concept its a Natural Language Processing NLP applications. When a user write something in the word document it will show the suggestions. For this I need to have the last 100 Characters in the Current Text Control(Text Pattern).

UIA(User Interface Automation) Framework provides access to the every TextPattern Control which is accessibilty Enabled. However when I try to access the current word document window text pane ( Editor) and text inside it does not provide me access. Former version of UIA is MSAA.

I need to access the current text editor pane(not the ribbion bar, scrools else) in the microsoft window 2007 or later document.

i have to access this thing through the UIA other option is OFFICE WORD Interop. OFFICE WORD Interop does not provide me the control over the user activity.

kindly suggest any sample code using UIA to get text inside the word editor document

Scenario required:

Open a word document and write something in the Text area. Now I need to access that text concurrently as my intelligent app will get the current text previous to max.100 characters and minimum 2 to show suggestions.

Please find the screencast link below the samples I made working to give you idea.

Only the Text Extraction part is not working right in MS-Word.

Check this Video I required Same functionality required from the MS word USING UIA

Waiting for your quick reply..

1
You can't get word's document using any Windows API, only by using Word/Office COM/Automation API. see here for a quote from a Microsoft guy: social.msdn.microsoft.com/Forums/vstudio/en-US/…Simon Mourier
And there is an example here that's using the Word API. It's combined with a little automation bootstrap (AccessibleObjectFromWindow), but it's the Word API that eventually talks to Word: stackoverflow.com/questions/2203968/…Simon Mourier

1 Answers

1
votes

Word 2007 doesn't have UI Automation support (much less TextPattern). You'll have to use the Word API.