Put the cursor to the end of the text

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 !
 
S

Steve Rindsberg

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
 
S

sylvainpellletier

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 !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top