Consulting

Results 1 to 6 of 6

Thread: How do i do something to CURRENT row in a table?

  1. #1
    VBAX Expert TrippyTom's Avatar
    Joined
    Jul 2005
    Location
    New York, NY (USA)
    Posts
    556
    Location

    How do i do something to CURRENT row in a table?

    I've seen examples of how to go through rows with a for/next loop, but is there a simple way just to do something to whatever row the cursor is on? Basically, I would like to:
    1) use the button on the Tables & Borders toolbar (insert row above)
    2) merge the resulting row into 1 "cell"
    3) set the top margin to 0.25"
    4) format font, color, etc
    5) put text in that cell

    I think I know how to do everything except #1
    Office 2010, Windows 7
    goal: to learn the most efficient way

  2. #2
    VBAX Expert TrippyTom's Avatar
    Joined
    Jul 2005
    Location
    New York, NY (USA)
    Posts
    556
    Location
    As usual, I dug enuf to find a workaround. I discovered right click is the same as pressing SHIFT + F10, so I used sendkeys to get it done. Perhaps not the best solution, but it works.

    Hope that helps others.
    Office 2010, Windows 7
    goal: to learn the most efficient way

  3. #3
    VBAX Expert TrippyTom's Avatar
    Joined
    Jul 2005
    Location
    New York, NY (USA)
    Posts
    556
    Location
    Well, it turns out I still need to figure out "current row" so i can format it. Anyone know how?
    Office 2010, Windows 7
    goal: to learn the most efficient way

  4. #4
    VBAX Expert TrippyTom's Avatar
    Joined
    Jul 2005
    Location
    New York, NY (USA)
    Posts
    556
    Location
    This is driving me crazy! Why doesn't PowerPoint have a ROWINDEX like Excel does? How else can I figure out the row number in order to format it properly in VBA?
    Office 2010, Windows 7
    goal: to learn the most efficient way

  5. #5
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    Hi Tom,

    I haven't done any PP automation personally, and a look at the object model and a google search has so far not revealed any solutions ...

  6. #6
    VBAX Expert TrippyTom's Avatar
    Joined
    Jul 2005
    Location
    New York, NY (USA)
    Posts
    556
    Location
    Yeah, that's why I'm going crazy. It's so frustrating. I didn't have much hair left to begin with, but I predict I will be bald by the end of the week.

    If anyone knows or discovers a workaround, I would truly appreciate it. Thanks.
    Office 2010, Windows 7
    goal: to learn the most efficient way

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •