Check if clicked in Word document not in general main Word window

L

Luc

I use Word automation in my VB6 application

-I want to check if the user mouseclicks in the actual document area of the
active Word window. So far I can check with a DLL if the user clicks on the
main Word Window (including the menu, and proppopupwindows, and i want to
avoid this)

So i have a DLL that fires my VB CallBack function when a general click (can
be on any external app) happens.

public function CallBack(...) 'fires when a general mouseclick happens
' I have made a function to check which is the active window, and gets
the handle
'This function contains a GetClassName API
ClassName = NameActiveWindow(Hendel)
if ClassName <> "OpusApp" then
'We are not in a Word App so exit
exit function
end if
end function


-Want to get the handle to the active (textbox shape) this to get the number
of textlines in it's textrange, a paragraphs or senctence or vbCR count is no
good because wordwrap is on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top