Posters here often wish to attach sample docs, but need to remove sensitive content. I recently needed to do the same, so came up with this quick hack. It replaces every paragraph in a document with the standard Rand() text -- "The Quick Brown Fox Jumps Over The Lazy Dog" -- but retains the paragraph's style.
Enjoy!
<pre>Sub RandifyActiveDocument()
Dim para As Paragraph
Dim rng As Range
For Each para In ActiveDocument.Paragraphs
If para.Range.Characters.count > 1 Then
Set rng = para.Range
rng.MoveEnd unit:=wdCharacter, count:=-1
rng.Text = "The Quick Brown Fox Jumps Over The Lazy Dog"
End If
Next para
End Sub
</pre>
Note that this doesn't affect the headers/footers, and doesn't remove comments, tracked changes, etc. (Though if someone wants to add that, sounds like a nice idea.)



