Hi Keith,
As I said, hacking the clipboard is often not the preferable way of solving
a problem. Knowing the overall objective helps in selecting a better method.
In your case, I would create a separate blank document as a scratch pad.
Declare and define two Range objects, one in the source document and one in
the scratch pad document. Set the source range to cover the first piece of
desired text (whether by its style, by its content or location, or from the
Selection). Then use a statement like this:
DestRange.FormattedText = SourceRange.FormattedText
to copy both the text and the formatting of the source into the
destination. This doesn't use the clipboard at all!
Now collapse the destination range and move it to the end of the scratch
pad, insert a paragraph mark there, move the source range to the next piece
of text in the original document, and repeat... until all needed text has
been copied.
Finally, sort the scratch pad, delete the duplicates, and print. You can
save the scratch pad as a separate document, discard it, or copy the
FormattedText of the entire scratch pad into a range in the original
document.