Returning the index number of the currently selected table

Posted on 2007-08-09
Last Modified: 2010-04-30
Dear Experts
Is it possible to get the index number of the currently selected table and display it in a Msgbox such as: "The cursor is located in Table no. xxx"

Help is appreciated. Thank you very  much in advance.

Regards, Andreas
Question by:AndreasHermle
    LVL 24

    Accepted Solution

    MsgBox "The cursor is located in Table no:" & _
    ActiveDocument.Range(0, Selection.Tables(1).Range.End).Tables.Count

    Author Comment

    thank you very much. It is working as desired.
    Regards, Andreas

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    I'm writing to share my clumsy experience in using this elegant tool so you can avoid every stupid mistake I made. (I leave it to the authorities to decide if this deserves a place in the Knowledge archives.)  Now that I am on the other side of my l…
    Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
    This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now