#  Other Applications & Softwares  > PowerPoint Formatting & General >  >  Select/format row in text box

## Rosten

Hi, I'm trying to make a VBA script with which you can format one specific row/paragraph in a text box. I would like to be able to select the row by putting the cursor on the relevant line.

Using the below code, I am able to do that, except that it doesn't work if the cursor is on the beginning or the end of a line.




```
Please Login or Register  to view this content.
```


What's the best way of making this work also for the beginning or end of a line? Is there a way of referring to the row you're on, or can one extend the selection like in word?

Edit: I played around some more, I think my current version only formats the word I'm currently on, not the line. Help still needed.

Cheers

----------


## FDibbins

Hi, welcome to the forum  :Smilie: 

Is this an excel question or powerpoint?

----------


## Rosten

> Hi, welcome to the forum 
> 
> Is this an excel question or powerpoint?



Hi, thank you!

This is for Power Point, specifically for textboxes in PP (I'm guessing shapes would work the same way). 

I want to make a table-of-contents slide describing the sections of the presentation. A copy of this slide is then to be placed at the beginning of each section with the current section highlighted. I want to use the macro to quickly highlight the row in the table-of-contents textbox that corresponds to the current section.

----------

