Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Determining if insertion point is in a field (Word2000)

    Hi

    What's the simplest way of determining whether the insertion point is INSIDE a field, and if it is, what the field type is?

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Determining if insertion point is in a field (Word2000)

    Never hurts to try a little search on the ol' database of posts. Look what I found at <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=vb&Number=39243&page=&v iew=&sb=&o=&vc=1#Post39243>this post</A>!
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Determining if insertion point is in a field (Word2000)

    Thanks, Kevin.

    Like you, I found the thread a bit hard to follow.

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Determining if insertion point is in a field (Word2000)

    > (I want to update the table of contents IF the cursor is in one, OR if a table of contents is in the selection.)

    There's a simpler way, then.

    You already know the selection point, so you already know .Selection.Range


    Consider looping through the document Finding each {TOC}. If any one of the found {TOC} lies within your .Selection.Range, then you've found that your selection lies within a TOC field.

    Is that close to an english-language description of the solution?

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Determining if insertion point is in a field (Word2000)

    Yes, I reached the same conclusion.

Posting Permissions

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