selecting multiple text form fields

D

Dan

Is there a way to select all form fields or an arbitrary subset of form
fields in a document at the same time, as opposed to just a single form field
using the FormFields("bookmark").select method. In VBA help, I looked under
the FormFields collection but didn't see anything in this regard.
Thanks,
Dan
 
D

David Horowitz

Dan,
It seems there is no way to do this. The issue is not exactly because you're
trying to select multiple FormFields, but just that there's no way in VB to
programmatically select multiple text ranges at all, let alone FormFields.
See the following article from the MS KnoewledgeBase:
http://support.microsoft.com/kb/288424
Sorry!
 
D

Dan

Thanks David; your post and that article exactly addressed my question. It's
odd, isn't it, that a feature available on the user GUI interface isn't
available programmatically! Oh well.
Dan
 
D

David Horowitz

It is rather odd. I don't think the ability to do discontinuous selections
existed from the beginning, so maybe they didn't want to figure out a way to
make it available it VBA. On the other hand, PowerPoint 2007 added a whole
bunch of new features, and they did make them available in VBA by creating
new classes. Like now in addition to the TextFrame class in PPT, there's a
TextFrame2 class which provides access to the new features. Something
similar could certainly by done in Word, or there are other ways to handle
it also. Well, it's a mystery as to why they didn't make it available.
 
G

Gordon Bentley-Mix

Dan,

May I ask why you want to select multiple formfields? The answer to this
question may lead to an alternative solution that will allow you to achieve
your desired goal without encountering the limitation in VBA that prevents
the selection of non-continuous content.
--
Cheers!

Gordon Bentley-Mix
Word MVP

Uninvited email contact will be marked as SPAM and ignored. Please post all
follow-ups to the newsgroup.
 

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