I want to make a textbox at the cursor-position.
I know how to make the text box, but how can I establish where the cursor is?
With this:
ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, 322.85, _
538.85, 216#, 54#).Select
the textbox is always placed at the same position?
Thanks in advance for any helpful hint
jokobe
Hi Jokobe,
like that:
Sub Makro1()
Dim x As Single
Dim y As Single
x = Selection.Information(wdHorizontalPositionRelativeToPage)
y = Selection.Information(wdVerticalPositionRelativeToPage)
ActiveDocument.Shapes.AddTextbox( _
msoTextOrientationHorizontal, x, y, _
100, 100).Select
End Sub
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Windows XP, Office 200
jokobe - 26 Mar 2008 20:12 GMT
Hi Helmut,
thanks for you answer, it is working now just the way I want it to work.
Jokobe
> Hi Jokobe,
>
[quoted text clipped - 13 lines]
> Helmut Weber, MVP WordVBA
> Windows XP, Office 200