Share via

How do you reverse word order for all sentences in a document?

Anonymous
2011-03-11T19:06:09+00:00

I would like to reverse the word order of every sentence in a document (e.g., if a sentence reads "Jack Sprat" I would like to reverse this sentence to read "Sprat Jack").

Any way to do this? Please advise!

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Paul Edstein 82,861 Reputation points Volunteer Moderator
2011-03-13T07:52:38+00:00

Thanks for the interest all!

 

Some background. I have 500 pages of text or so containing xpaths (i.e., documents/vss/blah/excellent.doc). My goal is to turn all these xpaths around so I can start sorting the various files alphabetically by file type (which will display "blocks" of the various file types...i.e., .doc, .xls, .pdf, and so on). Hope that helps and thanks for your interest!

Try a wildcard Find/Replace, where:

Find = ([!^13.]{1,}.)([!^13]{1,})(^13)

Replace = \2^t\1\2\3

This should give you each file's extension, followed by a tab, then the full path and filename (including the extension).

You can then sort the result without needing to turn it into a table (though you could easily turn the result into a two-column table if you prefer).

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Suzanne S Barnhill 278K Reputation points MVP Volunteer Moderator
    2011-03-11T20:08:29+00:00

    I believe Erik wants to reverse all the words, so that if a sentence has words 1234567, he wants the words to be in order 7654321. This could probably be done with a macro, and perhaps one of our VBA whizzes will see this and provide one.

    Was this answer helpful?

    0 comments No comments
  2. Suzanne S Barnhill 278K Reputation points MVP Volunteer Moderator
    2011-03-11T20:07:11+00:00

    This would appear to be the answer to a different question.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2011-03-11T19:19:06+00:00

    It suggests to me that you are saving the documents in a non-standard location and you need to add the location as a Trusted Location in Word Options.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2011-03-11T19:16:35+00:00

    Possibly, but there's too little detail to know the answer. If, for example, the names are always the third and fourth words in a sentence and always start with upper case letters, it may be possible. But there has to be some common logical pattern to do this automatically.

    Was this answer helpful?

    0 comments No comments