Testing whether selection is a point

  • Thread starter christophercbrewster via OfficeKB.com
  • Start date
C

christophercbrewster via OfficeKB.com

I need to make sure that the current selection is an insertion point. I'm
sure I've seen a function for this (something like IsInsertionPoint), but
after searching every way I can think of, I can't find the way to do this.

I'd appreciate advice about this particular question but also for the general
problem of finding such things. For example can't find a simple alphabetic
list of Word VBA built-in functions. I can't find the discussion that I once
saw about the types of selections. There does not seem to be one thorough,
integrated reference. I hope I'm wrong, and there's a good place to look.
Thanks for tips.

--
Christopher Brewster
Lockheed Martin, Eagan MN

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-programming/200901/1
 
J

Jay Freedman

Hi Christopher,

The syntax to answer your specific question is

If Selection.Type = wdSelectionIP Then

The answer to the general question is a little messier. Almost everything is
documented in the MSDN library, but some of it is more complete than other
parts.

If you have Office 2007, start at
http://msdn.microsoft.com/en-us/library/aa432022.aspx, particularly the link
to the object model. However, a lot of VBA in 2007 is the same as in 2003,
so look in this area only if you're dealing with something that's new in
2007.

For Office 2003 and earlier, start at
http://msdn.microsoft.com/en-us/library/bb190882(office.11).aspx. Notice
that there are two separate parts to look at: one specifically for each
program (such as Word), and one for Office in general (the Microsoft Office
Visual Basic Reference link).

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
C

christophercbrewster via OfficeKB.com

Thanks for the links. I'm not sure I would have found my answer in those
sources, either, but it's nice to know the best places to look.

Jay said:
Hi Christopher,

The syntax to answer your specific question is

If Selection.Type = wdSelectionIP Then

The answer to the general question is a little messier. Almost everything is
documented in the MSDN library, but some of it is more complete than other
parts.

If you have Office 2007, start at
http://msdn.microsoft.com/en-us/library/aa432022.aspx, particularly the link
to the object model. However, a lot of VBA in 2007 is the same as in 2003,
so look in this area only if you're dealing with something that's new in
2007.

For Office 2003 and earlier, start at
http://msdn.microsoft.com/en-us/library/bb190882(office.11).aspx. Notice
that there are two separate parts to look at: one specifically for each
program (such as Word), and one for Office in general (the Microsoft Office
Visual Basic Reference link).
I need to make sure that the current selection is an insertion point.
I'm sure I've seen a function for this (something like
[quoted text clipped - 7 lines]
does not seem to be one thorough, integrated reference. I hope I'm
wrong, and there's a good place to look. Thanks for tips.

--
Christopher Brewster
Lockheed Martin, Eagan MN

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-programming/200901/1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top