H
Helmut Weber
Hi friends,
maybe you've followed the discussion on "find line numbers".
As easy as that, it seemed, but read, what Larry reports.
I thought about this and that,
but things got more and more complicated.
Here and now I have arrived at this mystery:
Alright with the selection within one line:
With Selection
MsgBox .Characters.First.Bookmarks("\line").Range.Text
MsgBox .Characters.Last.Bookmarks("\line").Range.Text
End With
Not so if the selection spans over more than one line.
"The requested member of the collection does not exist".
Any thoughts?
--
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
maybe you've followed the discussion on "find line numbers".
As easy as that, it seemed, but read, what Larry reports.
I thought about this and that,
but things got more and more complicated.
Here and now I have arrived at this mystery:
Alright with the selection within one line:
With Selection
MsgBox .Characters.First.Bookmarks("\line").Range.Text
MsgBox .Characters.Last.Bookmarks("\line").Range.Text
End With
Not so if the selection spans over more than one line.
"The requested member of the collection does not exist".
Any thoughts?
--
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"