PDA

View Full Version : Solved: Column Width Set



petedw
10-11-2005, 01:07 AM
Hi guys,

I am inserting rows of tables into my document using the insertfile method.
When i do this, it leaves a line space between each row so i use the selection.typebackspace command to remove this. This is fine as it joins the rows up into 1 table.
The problem i'm having is that i need the the tables right hand edge to all line up. If i set the column width, then this is fine unless there are more than 1 columns in each row. How can i make the entire table the same width??

Thanks

Pete

fumei
10-11-2005, 03:03 AM
Huh? This seems very strange to me. Why are doing this?????

inserting rows of tables into my document using the insertfile method
Say what???? That, no offence, is ridiculous.

Insertfile means the file has to exist already. You are inserting this again and again? Why?

Why are you doing this. Why not....uh... just make a table?

Of COURSE if you make individual tables there is going to be a space between them. Making a table row, then another, then backspacing to remove the space is really insane.

Pete, you can do better than that. What EXACTLY are you trying to do? What do you want to happen?

petedw
10-11-2005, 03:16 AM
The coding is to go with a form. The form is for creating a typical Electricity Bill table. The tables are different for each person's bill yet contain the same rows just in another order.
I have created a form which allows them to choose which rows they require and in which order they want them. Once they have picked the rows and the order of the rows, they click a command button on the form to draw the table. This drags in all the required rows (using the inserfile command) but then doesn't line them up neatly.

Do you understand what i need now??

Many Thanks

Pete

TonyJollans
10-11-2005, 05:18 AM
So that explains why my electricity bill is a mess :D

TonyJollans
10-11-2005, 05:23 AM
More seriously, there are many (often conflicting) factors which affect precise positioning of column edges. You will end up writing far more code to make all the odd rows line up than you ever would writing code which created the tables in the first place.

Go with Gerry - build the table yourself and stop trying to pull in files. Nothing you have posted suggests any need for lots of external files.

petedw
10-11-2005, 05:23 AM
Grrrr! :motz2: lol

fumei
10-11-2005, 04:03 PM
Pete, you are confusing the CONTENT of the rows with the rows themselves.

If I understand correctly....

You have a form whereby you allow the user to create a table. The table has X number of rows...say, 5. Let's call them row A, B, C, D, E.

User 1 selects to create a table with rows set up as ADECB. User 2 selects to create a table with rows set up as ABEDC.

This is only relevant if you DO have external files for each row. Otherwise, as far as Word needs to be concerned, both situations have a table with 5 rows.

Now you can do it with external files, but not only does this increase I/O, but it is rather poor document design. Perhaps if you describe the contents more fully we can assist. Do these rows contain formfields? Is there anything IN these rows? In other words, what is stopping you from simply creating a table with X number of rows and putting in the content according to the user selection?

petedw
10-12-2005, 12:17 AM
I have seperate documents set up for each row of the table.
The rows contain text and formfields.
The table is never a fixed amount of rows.

I have sorted my original problem by simply making sure all the documents that contain the individual rows are set to the same width. I have coding that creates the table using the rows the user selects. All i have to create now is coding that names the formfields if the row is selected more than once in the table.