Prevent User from Adding Rows

J

Jean-Guy Marcil

Bonjour,

Dans son message, < Kim > écrivait :
In this message, < Kim > wrote:

|| Is there anyway to prevent users from adding rows to a preset table?

Unless you are working with a locked up form, then I believe the answer is
No.
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
J

Jezebel

It's not trivial coding, but you can do it by trapping the
WindowsSelectionChange event: this is fired (amongst many other
circumstances) when the user moves into a cell: at that point you check if
they are in the table you are concerned about, and if so, whether the table
now has more rows than it should. If so, Undo until the number of rows is
back to where it should be.
 
D

DDM

Kim, here's another approach, in addition to those suggested by the others:

Insert continuous section breaks (Insert > Break > Continuous > OK) above
and below your table, then protect the document (Tools > Protection),
protecting only the section with the table (procedure differs slightly in
different versions of Word). That will put the table completely "off-limits"
to users.

If you want to allow users to fill in information but not otherwise to
modify the table, first insert form fields in the table cells (View >
Toolbars > Forms), then follow the procedure above to protect the table.
 
J

Jean-Guy Marcil

Bonjour,

Dans son message, < DDM > écrivait :
In this message, < DDM > wrote:

|| Kim, here's another approach, in addition to those suggested by the
others:
||
|| Insert continuous section breaks (Insert > Break > Continuous > OK) above
|| and below your table, then protect the document (Tools > Protection),
|| protecting only the section with the table (procedure differs slightly in
|| different versions of Word). That will put the table completely
"off-limits"
|| to users.
||
|| If you want to allow users to fill in information but not otherwise to
|| modify the table, first insert form fields in the table cells (View >
|| Toolbars > Forms), then follow the procedure above to protect the table.
||

But keep in mind that if you lock up a section, a lot of functionality will
be lost in the whole document (not just the locked up section)...
Maybe Word 2003 has been changed to improve on this?

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
J

Jay Freedman

Jean-Guy Marcil said:
Bonjour,

Dans son message, < DDM > écrivait :


But keep in mind that if you lock up a section, a lot of
functionality will be lost in the whole document (not just the locked
up section)... Maybe Word 2003 has been changed to improve on this?

Word 2003 has indeed improved this, but with the requirement that everybody
to whom you send the document for updates must also have 2003. In that case,
you can mark specific areas -- the whole table, or individual cells, or even
specific characters or words within a cell -- as protected. (Actually, it's
the reverse: you mark all the areas that other users are allowed to edit.)
You don't have to use forms protection with all the limitations that causes.

On the downside, if someone with Word 2002 or earlier opens a document that
was protected this way, the entire document appears to be protected.

Also, like forms protection, this new protection is easily defeated by a
knowledgeable user, so don't think that it provides any "security" feature.
It just makes it unlikely that anything will be changed unintentionally.
 

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