Consulting

Results 1 to 6 of 6

Thread: Using VBA to add horizontal and vertical guides at the cursor position

  1. #1

    Using VBA to add horizontal and vertical guides at the cursor position

    Hello all,

    I'd need a macro in PPT to add a horizontal and vertical guide at the point where the cursor is placed on the screen. I've looked online, and I understand that there is a Guides.Add method which could help, but for the life of me I can't understand how to get the position of the cursor and incorporate that into Guides.Add.

    Does anyone have an idea how I could do this in VBA?

    Thank you,

    -Isa

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    There's no easy way to get the cursor position. You can though add a shape and a guide aligned with it's top and left. There's also the problem of running the macro without moving the cursor!
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    Quote Originally Posted by John Wilson View Post
    There's no easy way to get the cursor position.
    That's a shame. I looked around and found a couple of suggestions, but they seem not to work. Well, I'll just have to find another way.

    Thanks for your help anyway.

    -Isa

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    Even if you could how would you run the macro?
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  5. #5
    I was thinking about using a few seconds pause in the macro, which would allow me to place the cursor where I need it.

  6. #6
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    Far easier to have a guide shape you drag to the correct position.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Posting Permissions

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