Given a 5x5 Word table I can create a bookmark that spans some but not all of the cells in the table, e.g. I can bookmark from column 3 row 2 down and across to column 5 row 5. Meanwhile in Excel I've got a block of cells that are exactly the same size (3 cols wide by 4 rows high).
I would like to do something like:
Code: Select all
Set BMRange = ActiveDocument.Bookmarks("bmkInTable").Range
BMRange.Text = xlWsh.Range("C11:E14").Text
ActiveDocument.Bookmarks.Add "bmkInTable", BMRange
but the above code errors, 'invalid use of null'.
Can my code, which works fine if the bookmark is a single cell, be adapted for a bookmark that spans more than one cell?
Ken