Stop auto-scrolling/targeting...

A

Angyl

I'm using a form checkboxes in Word to automatically populate form fields
elsehwere in the document with data.

If user checks box 2, then field 2 at the top of the document displays text.

The problem is that Word is automatically jumping up to Field 2 at the top
of the document when the checkbox is on page 2. It's very annoying. Is
there a way to stop this auto-scrolling/targeting of a location?
 
J

Jay Freedman

Angyl said:
I'm using a form checkboxes in Word to automatically populate form
fields elsehwere in the document with data.

If user checks box 2, then field 2 at the top of the document
displays text.

The problem is that Word is automatically jumping up to Field 2 at
the top of the document when the checkbox is on page 2. It's very
annoying. Is there a way to stop this auto-scrolling/targeting of a
location?

You're probably using the Selection object in your macro. Don't do that --
use a Range object, or the .Range property of the field being filled. If you
want more specific advice, post the code you have now.

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

Angyl

Here's a sample of my code,

With ActiveDocument
If .FormFields("Check1").CheckBox.Value = True Then
.FormFields("Field1").Result = "1"
Else
.FormFields("FieldBlank1").Result = " "
End If
End With
 
A

Angyl

And actually, what I've realized that it's doing is jumping to the first
field in the document (regardless of where/what it is) after each check box
is toggled.
 
J

Jay Freedman

That looks pretty standard, and it shouldn't have any effect on the
selection. (I assume you intended "Field1" and "FieldBlank1" to refer to
different fields. Or is that a mistake?)

If you want to send me a copy of the template attached to an email, I'll
have a look at it. The address in my profile is valid.

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

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