Re: Moving to next field with F11 in protected document
- From: "David" <davids9307@xxxxxxx>
- Date: 12 Apr 2007 14:13:53 -0700
On Apr 12, 11:36 am, "Jean-Guy Marcil" <DontEvenTry@NoSpam> wrote:
David was telling us:
David nous racontait que :
I have a VBA macro that selects the word to the left of the cursor and
inserts a file of that name into the document. The macro counts the
fields in the document before and after the file is inserted, and if
the number increases (meaning there are fields in the file that was
inserted), it goes to the first field and ends. The user types what he
wants there and advances to the next field using F11. Now we want to
use this macro in a document where part of the document is protected,
and we find not only that the macro will not advance the cursor to the
first field but also that F11 will not move it to the next field, even
though it is in the unprotected part of the document.
I could turn off the protection at the start of the macro, but I don't
have a way to turn it back on, since the macro ends before the user
types into the various fields. Is there any way around this? As a last
resort, I would even settle for turning the protection back on after
some delay to allow the user time to enter the text in the various
fields.
Thanks in advance for any help.
What types of fields do you fnd in the protected parts?
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREM...@xxxxxxxxxxxxxxxxxxxxxxx
Word MVP site:http://www.word.mvps.org- Hide quoted text -
- Show quoted text -
In the protected part, I don't see any fields, but there are a lot of
bookmarks. The users don't have to enter anything there, as it has
already been completed before we get the document. In the unprotected
part, there are about 6,000 files that a user can insert using the
macro. In the ones I looked at that have fields, they are all quote
fields.
This is the line that no longer advances the cursor to the first
field, if that is any help. But I would be satisfied if just F11 would
advance to the next field.
If bk2 > bk1 Then ActiveDocument.Bookmarks("\prevsel1").Select:
Selection.NextField.Select: Selection.MoveRight unit:=wdCharacter,
Count:=1: Exit Sub
Thanks again for any assistance.
David
.
- Follow-Ups:
- Re: Moving to next field with F11 in protected document
- From: Jean-Guy Marcil
- Re: Moving to next field with F11 in protected document
- References:
- Moving to next field with F11 in protected document
- From: David
- Re: Moving to next field with F11 in protected document
- From: Jean-Guy Marcil
- Moving to next field with F11 in protected document
- Prev by Date: Re: Moving to next field with F11 in protected document
- Next by Date: Re: Moving to next field with F11 in protected document
- Previous by thread: Re: Moving to next field with F11 in protected document
- Next by thread: Re: Moving to next field with F11 in protected document
- Index(es):
Relevant Pages
|
Loading