![]() ![]() Any ideas? I've tried insertbefore and that works but I have to insert several checkboxes in the same cell. with the checkbox and I can't seem to position it to the end of the cell first. If I try to put it on two lines it will just overwrite cell 1. I get "requested member of the collection doesn't exist. oDoc.Tables(t).Cell(i, 2).Range.Text = "Planned: " & oDoc.Tables(t).Cell(i, 1).(wdContentControlCheckBox) I've tried recording a macro and that just shows the bit about selection first. as far as I can tell it's because i'm not creating the table then selecting it. I've tried several ways that just don't seem to work. What I need to do is add a check-able checkbox to rows with text like this. I do it in this manner because I just don't know how many rows any given table is - so I create the rows as I need them, might be clumsy but it works. ODoc.Tables(t).Cell(i, 2).Range.Text = "Check Definition" I = i + 1 'advance to row below control number row. ODoc.Tables(t).Rows(i).Shading.BackgroundPatternColor = oTableHeaderColor ODoc.Tables(t).Rows(i). = wdAlignParagraphCenter ![]() oDoc.Tables(t).Rows.Add 'add a row below control number My VBA dynamically writes several tables depending on criteria and works quite well.įor example here is adding a row, formatting it and advancing to the next row. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |