D
David
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.
David
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.
David