I am not quite sure what you mean by <how to go to the 5 text location in the
cell and copy the rest of the text>. If you mean that you want to find all
text in the cell except the first 4 characters, you could use the code below
(below, I have named the variable strBkText instead of strWord1).
Note that a table cell ends with a cell marker that has a length of 2.
Therefore, a total of 6 characters are subtracted from the string containing
all text in the cell: the first 4 characters + the cell marker)
With ActiveDocument.Sections(1).Range.Tables(1)
'First get all text in the cell
strBkText = .Cell(1, 4).Range.Text
'Now remove the first 4 characters + the cell marker (length 2)
strBkText = Mid(strBkText, 5, Len(strBkText) - 6)
End With
Note 1: The code you used as the starting point had to get text from a
footer. This is why ".Section(1)" was included. If your table is simply the
first table in the document, you only need:
With ActiveDocument.Tables(1)
Note 2: In your code, you have this line:
.Bookmarks(strTitle).Range
Your bookmark name, however, is in the variable "strBk1" so the line needs
to be changed to:
.Bookmarks(strBk1).Range

Signature
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word
> I was looking at all the table questions last night and found a macro written
> by Lene Fredborg that does almost what I am looking for. What I’m looking for
[quoted text clipped - 23 lines]
> End With
> Set oBkRange = Nothing
LEU - 08 Jul 2007 20:22 GMT
Lene,
The macro worked great.
Thank you for your help. I have learned alot about how tables work.
LEU
> I am not quite sure what you mean by <how to go to the 5 text location in the
> cell and copy the rest of the text>. If you mean that you want to find all
[quoted text clipped - 53 lines]
> > End With
> > Set oBkRange = Nothing