M
Meredith
I'm trying to write a VBA macro that will essential split one text box
into two text boxes right where my cursor is. (Basically I want to
split a couple of paragraphs apart so I can insert an example image
between them. I do this all the time, so if I could do it with a
single keystroke, I'd save TONS of time.)
My general algorithm is as follows:
(User double clicks in a shape to edit text, places cursor where the
text is to be split)
- Figure out what shape is selected
- Duplicate it
- Figure out where the cursor is located
- Delete cursor location to end of text in the original shape
- Delete beginning of text to cursor location in the duplicated shape
- Reposition them to be immediately above and below each other
(hopefully there's some way to detect or calculate the height of the
text in each shape, and position accordingly)
Everything was going smoothly until I tried to find a method that
would tell me where the cursor is currently editing. Does such a thing
exist, or am I stuck?
Unfortunately my original shape doesn't even seem to recognize it's
open for editing... its IsOpenForTextEdit boolean is always false when
I debug. I've pretty much lost all hope but thought I'd give the
community a chance to tell me I missed something
Any pointers would be hugely appreciated,
Meredith
into two text boxes right where my cursor is. (Basically I want to
split a couple of paragraphs apart so I can insert an example image
between them. I do this all the time, so if I could do it with a
single keystroke, I'd save TONS of time.)
My general algorithm is as follows:
(User double clicks in a shape to edit text, places cursor where the
text is to be split)
- Figure out what shape is selected
- Duplicate it
- Figure out where the cursor is located
- Delete cursor location to end of text in the original shape
- Delete beginning of text to cursor location in the duplicated shape
- Reposition them to be immediately above and below each other
(hopefully there's some way to detect or calculate the height of the
text in each shape, and position accordingly)
Everything was going smoothly until I tried to find a method that
would tell me where the cursor is currently editing. Does such a thing
exist, or am I stuck?
Unfortunately my original shape doesn't even seem to recognize it's
open for editing... its IsOpenForTextEdit boolean is always false when
I debug. I've pretty much lost all hope but thought I'd give the
community a chance to tell me I missed something
Any pointers would be hugely appreciated,
Meredith