Put the cursor to the end of the text

  • Thread starter Thread starter sylvainpellletier
  • Start date Start date
S

sylvainpellletier

Hello everybody,

I run a macro thats selects Cells in Excel and copy them into one
textFrame in powerpoint :

For Each c In Range("A1:A10")

With PPApp.ActiveWindow.Selection.TextRange
.text = Chr$(CharCode:=9) + c.Value + Chr$(CharCode:=13)
End With
Next

My problem is that I do not know how to deselect the text I've just
pasted. Therefore when I paste the next cell, the first one is
erased.
How could I deselect the pasted text and put the cursor to the end of
the text ?
Thanks in advance for your answers.

Bye !
 
Hello everybody,

I run a macro thats selects Cells in Excel and copy them into one
textFrame in powerpoint :

For Each c In Range("A1:A10")

With PPApp.ActiveWindow.Selection.TextRange
.text = Chr$(CharCode:=9) + c.Value + Chr$(CharCode:=13)
End With
Next

My problem is that I do not know how to deselect the text I've just
pasted. Therefore when I paste the next cell, the first one is
erased.
How could I deselect the pasted text and put the cursor to the end of
the text ?

This should do it:

With PPApp.ActiveWindow.Selection.TextRange
.text = .text & Chr$(CharCode:=9) + c.Value + Chr$(CharCode:=13)
End With
 
This should do it:

With PPApp.ActiveWindow.Selection.TextRange
.text = .text & Chr$(CharCode:=9) + c.Value + Chr$(CharCode:=13)
End With

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================- Masquer le texte des messages précédents -

- Afficher le texte des messages précédents -

Thanks Steve !
 
Back
Top