Because ActiveDocument.Text() Would Be Too Easy...
October 2, 2008 5:31 PM
Subscribe
I'm writing a code analysis tool in VB.NET for Visual Studio 2005. Help me extract the text of the active window.
My plan: Create an add-in that will put an "Analyze" item in the Tools menu. The developer opens her code file, clicks the menu item, and all of the text in the currently-active window is passed to the analysis engine I am writing.
What I can't seem to crack is how to get all of the text in the active window. Googling has provided some insight as to how to get TextPoint and EditPoint objects, but nothing that takes me all the way to just having a string (or some reasonable object) that contains a bunch of text for me to process.
Is this even possible? If not, I'd be happy for suggestions as to how I can divine the full path to the disk file that contains the text in the active window. Many thanks.
posted by DWRoelands to computers & internet (3 comments total)
1 user marked this as a favorite
posted by sanko at 5:35 PM on October 2, 2008 [1 favorite has favorites]