Creating a custom table...

R

Robin

A couple of issues regarding table creation. I want to insert a set of tables
in a document header, but so they appear in the middle (vertically) of the
page concerned. I want them in the header so the user cannot inadvertantly
modify the table contents directly without actively entering into the header:

1. I have a dialog where a user can specify the number of rows that must be
in a table. For example if they enter 4 then the table must be created and
inserted with 4 rows and 2 columns. There are always 2 columns - how do I
achieve the table creation and insertion at a specific place (perhaps
coordinate) in a document?

2. The user may then decide that any of the rows must be removed, for
example row 2, which means the contents of rows 3 and 4 must be shifted up.
The problem here is that each rown contains a data field, which means the
fields in row2,col1 and row2, col2 must now be replaced by those from
row3,col1 and row3,col3 and so on. Any suggestions?

3. Finally, there are three tables that need to be inserted, one beneath the
other - each containing different data fields. There may be some situations
where table 2 never exists (not needed), but then the user may at a later
time decide it is needed. Any neat ways of dealing with this?

thanks
Robin
 
D

Doug Robbins - Word MVP

I would start with a template that already contained the tables in the
position that you wanted them and then use code to add the necessary number
of rows so that the total rows match the number input by the user.

For the second part of your problem, just use code to delete row 2. Rows 3
and 4 will then automatically become rows 2 and 3

For 3, add the necessary rows to table 1 and then split the table at the
first of the new rows.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

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