What version of Word did bookmark("\line") become available?

J

Jeffrey Bradshaw

I need to count the physical lines in a document. I'm using the \line
bookmark but it appears as if in older versions of Word it doesn't exist.
Can anybody tell me what version \line became available?

TIA - Jeffrey
 
J

Jonathan West

It was available at least in Word 6, probably Word 2, though I don't have a
copy of that any more to test it with :)
 
J

Jeffrey Bradshaw

Jonathon,
Thanks for the info. Can you answer me then why if I open a document and do
a worddoc.bookmarks("\line").select() it would come back with a single
character? It seems to be something in the document because if I create a
new document it works fine. (I'm getting the document to process from a
client so I'm not sure what the options are.)

TIA - Jeffrey
 
C

Cindy M -WordMVP-

Hi Jeffrey,
Can you answer me then why if I open a document and do
a worddoc.bookmarks("\line").select() it would come back with a single
character? It seems to be something in the document because if I create a
new document it works fine. (I'm getting the document to process from a
client so I'm not sure what the options are.)
I'm assuming that you've used this code in other circumstances and that
there it worked differently. I usually would use
bookmarks("\line").RANGE.Select explicitly, but I doubt that making this
change would make any difference in what you're seeing...

Hard to say what the cause might be without knowing more about the
document. For example, which version of Word was it created in? Or was it
originally written in Word at all? How many conversions has it gone
through?

Here's a quick test for determining whether the problem is being caused by
some kind of corruption:

1. Create a new document
2. Copy a couple of paragraphs from this document to the new one
3. Run the macro code. Do you get the same result?

If no, then the problem is in the document structure. If yes, then

4. Start over, and this time use Edit/Paste Special to paste as plain text.
5. Run the macro again. This time, I expect you should get a "normal"
result, and the problem is most likely in the paragraph marks of the
original document.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top