how to insert something in the current cursor position

Add-in Express™ Support Service
That's what is more important than anything else

how to insert something in the current cursor position
how to insert something in the current cursor position 
Brian Goldberg




Posts: 3
Joined: 2007-01-02
I want to insert something at the current cursor position in Word when the user clicks a button on my toolbar. Can you show me basic sample code?

TIA
Posted 23 Jan, 2007 19:30:47 Top
Dmitry Kostochko


Add-in Express team


Posts: 2880
Joined: 2004-04-05
Hi Brian,

See the code below:

procedure TAddInModule.adxCommandBar1Controls0Click(Sender: TObject);
begin
  WordApp.Selection.InsertAfter('My text');
end;


P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.


Posted 24 Jan, 2007 06:08:06 Top