PDA

Click to See Complete Forum and Search --> : What is the ClassName for 'textbox shape' from Word doc


lvermeersch
Dec 15th, 2005, 04:54 AM
One of the last things i need to complete my project.
I urgentlly need following.
I want the classname of a textbox shape

So i know how to get the text of the active textbox shape

Set Tbox = AppWord.selection.Shaperange
tk = tbox.textframe.textrange.text

Now i really need the handle of the active textbox shape.
I know i can use FindWindowEx API for this but i need the correct classname
I tried:

Hendel = FindWIndowEx(0,0,"Edit",vbnullstring)

I only get zero for the handle. I probably search for the wrong classname. I allso tried RichEdit or RichEdit20W instead of Edit.

lvermeersch
Dec 23rd, 2005, 10:47 AM
To get the classname or better the handle of a Word doc Textbox shape.
Didn't found it yet but have found some extra info.

I now can get the Word document's handle (so not only the WordApp handle) but the handle from the area of the Word document containing the text and objects pictures etc.
I found this using a spy programm to get the correct classname for the word document.
Now the Textboxshape doens't seem to have a seperate classname, the SPY soft could't detect this. (i suppose i should use a method to loop trough al the doc items.)
I am stuck here.
Some help here please.