Click to See Complete Forum and Search --> : Getting text from other applications.


Martin Smith
August 31st, 2001, 08:13 AM
For a Microsoft Word Document I can determine that the main document body is in a control of class _WwG, and currently has a handle of &H70506

Yet despite the document containing visible text the GetWindowText function returns "". Is there any way I can get the actual text content of another window (not just for MSWord but textual contents of any application's window)

Thanking you in advance,

Martin Smith

KIK
September 3rd, 2001, 08:59 AM
dim a as scripting.filesystemobject
dim b as scripting.textstream
set a =new filesystemobject
set b=a.opentextfile(...)




you do not have to use api.
you can read/write to a textstream object

KIK

Martin Smith
September 3rd, 2001, 09:38 AM
Hi KIK,

Thank you for your reply but just to clarify, I was using the Word Document as an example to illustrate what I want to be able to do (as the actual text I am trying to extract is from a document management system that I suspect fewer people have used). I was hoping to use the same technique of getting text from a control with a known hwnd for my own ends - it is a property dialog which I am trying to interrogate.