Results 1 to 14 of 14

Thread: Cannot access individual columns because table has mixed cell widths

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Hi all,

    Thanks for all the replies so far. To answer some of the points raised:

    Tony: the code runs fine up to the point where it creates a Word document with an empty 3-column table on it where the 3 columns are of equal width. When I run it through the debugger, the code stops executing at the first line that tries to amend a column width, ie
    TableObj.Columns(1).Width = 260
    Killian: the 'and so forth...' bit that I mentioned in my original post is just code that prints some text at the top of the page before the table is printed, so I can't imagine it's doing any harm.

    The other thing I notice is that when I run the code and get this error, it seems to take longer for the table to appear that it does when it's working properly. Not sure if that is significant or not.

    Mr. Doubtfire: I don't have anything in my code at the minute like these lines from your code:
    Set objApp = Nothing  
    Set Tbl1 = Nothing
    Could that be causing a problem? Having said that, the thing that drives me up the wall is that this my code WAS working fine and now isn't. It's the unpredictability that's so annoying! I have 3 similar agents that produce similar 3-column tables for 3 different scenarios. Either they all work or none of them does. If anyone has any more ideas, I'd love to hear them. Thanks!
    Last edited by Aussiebear; 03-21-2025 at 06:30 AM.

Posting Permissions

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