L
Lenny
In a nutshell:
1. Word 2003 protected form template w/form fields
2. Form is a table
3. Page 1 (table) replicates itself to create additional pages in the file.
(the entire table w/form fields has been created as an autotext entry)
4. With macro code, and custom toolbar, user clicks 'add sheet', code
unprotects the document, jumps to bottom of page, inserts page break then
inserts the autotext entry and reprotects the document with a password.
5. Works just fine..... now users want to be able to 'delete' the last page
in case they add too many.
I have identified specific tables (table 1, table 2, etc) (that was in a
fixed position relative to other pages in the document) in other vb code
projects but was wondering if there was a way to identify the 'current' table
the cursor is in or 'last' table?
To accomplish the deletion of the page, I ran a macro that starts with the
cursor in a specific cell in the protected table. The user then clicks on
the toolbar to 'delete sheet' and the macro unlocks the document, moves up to
the first cell in the table, highlights all cells in the table, hits 'table -
rows - delete', back space to bottom of prior page, relocks down with
password.
This works, though very inelegantly. You see the screen briefly go black
from the row highlighting and it then blinks (screen refresh). Is there a
way to identify this table since there is no way of knowing whether it is
table 2 or 20?
Assistance is always appreciated. Lenny
1. Word 2003 protected form template w/form fields
2. Form is a table
3. Page 1 (table) replicates itself to create additional pages in the file.
(the entire table w/form fields has been created as an autotext entry)
4. With macro code, and custom toolbar, user clicks 'add sheet', code
unprotects the document, jumps to bottom of page, inserts page break then
inserts the autotext entry and reprotects the document with a password.
5. Works just fine..... now users want to be able to 'delete' the last page
in case they add too many.
I have identified specific tables (table 1, table 2, etc) (that was in a
fixed position relative to other pages in the document) in other vb code
projects but was wondering if there was a way to identify the 'current' table
the cursor is in or 'last' table?
To accomplish the deletion of the page, I ran a macro that starts with the
cursor in a specific cell in the protected table. The user then clicks on
the toolbar to 'delete sheet' and the macro unlocks the document, moves up to
the first cell in the table, highlights all cells in the table, hits 'table -
rows - delete', back space to bottom of prior page, relocks down with
password.
This works, though very inelegantly. You see the screen briefly go black
from the row highlighting and it then blinks (screen refresh). Is there a
way to identify this table since there is no way of knowing whether it is
table 2 or 20?
Assistance is always appreciated. Lenny