Consulting

Results 1 to 8 of 8

Thread: Solved: Column Width Set

  1. #1
    VBAX Regular
    Joined
    Apr 2005
    Posts
    86
    Location

    Solved: Column Width Set

    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
    If you can't convince them, confuse them!

  2. #2
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    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?

  3. #3
    VBAX Regular
    Joined
    Apr 2005
    Posts
    86
    Location
    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
    If you can't convince them, confuse them!

  4. #4
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    So that explains why my electricity bill is a mess
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  5. #5
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    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.
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  6. #6
    VBAX Regular
    Joined
    Apr 2005
    Posts
    86
    Location
    Grrrr! lol
    If you can't convince them, confuse them!

  7. #7
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    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?

  8. #8
    VBAX Regular
    Joined
    Apr 2005
    Posts
    86
    Location
    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.
    If you can't convince them, confuse them!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •