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