I'm using word Automation through my vb6.
I use the textbox shapes and want to check the number of textlines existing in the active textbox shape.
I know how to to this when wordwrap is off (by counting vbCR)
, but is'nt correct when wordwrap is ON. How to solve this
I can get the active text from the textboxShape:
VB Code:
Set TBox = AppWord.Selection.ShapeRange tk = Tbox.TextFrame.TextRange.Text
Maybe there is a count prop or something. Any idea's?
Extra info: maybe i need to check on the linebreaks chr(10) but did this with a instr() function and it doens't find any.
tk = AppWord.Selection.Shaperange.TextFrame.TextRange.Text
Firstlinebr = instr(tk,chr(10))




Reply With Quote