Teacha
11-13-2007, 10:23 AM
Hello experts,
I am trying to determine a work around for a vertically merged cells error I get when I run a macro in a Word.
I have a template used to create a file of multiple templates that was created entirely with a table. (merged and shaded and all to help with data entry) Once this file of data has been compiled the macros splits the files up by tables. I have code that works for that, I am having touble naming the newly split files because I want them to be named by a certain alphanumeric code that is in a specific location in each table of the original file. I cannot access the contents (i dont think so anyway) by using
strCellText = ActiveDocument.Tables(1).Rows(1).Cells(1).Range.Text
because it gives a Runtime error 5991 Cannot access individual rows in this collection because the table has vertically merged cells.
Is there a work around, can i access this table entry another way so I can use it in the file name?:doh:
Some info that might be helpful is that the code I am looking to use is always preceeded by the word "code" in the cell immediately to the left.
I am trying to determine a work around for a vertically merged cells error I get when I run a macro in a Word.
I have a template used to create a file of multiple templates that was created entirely with a table. (merged and shaded and all to help with data entry) Once this file of data has been compiled the macros splits the files up by tables. I have code that works for that, I am having touble naming the newly split files because I want them to be named by a certain alphanumeric code that is in a specific location in each table of the original file. I cannot access the contents (i dont think so anyway) by using
strCellText = ActiveDocument.Tables(1).Rows(1).Cells(1).Range.Text
because it gives a Runtime error 5991 Cannot access individual rows in this collection because the table has vertically merged cells.
Is there a work around, can i access this table entry another way so I can use it in the file name?:doh:
Some info that might be helpful is that the code I am looking to use is always preceeded by the word "code" in the cell immediately to the left.