Quote:
Originally Posted by gmayor
Could you clear RangeA after processing?
|
I'm afraid not, the space must be cleared before the processing starts.
So far I've been using this code, but like I said, it's messing up the clipboard...
Code:
Selection.Copy
Selection.Delete
'
' processing here...
'
Selection.Paste
Is there any other straightforward solution to replicate this copy/paste behaviour as close as possible?
I also thought about saving the original clipboard content to a variable before 'Selection.Copy', and then restore it back before the end of the macro. That would still be a decent solution, although not that elegant. But the clipboard can also contain binary information (not only text), and I could not find a way to do this in Word VBA. Saving from and writing back to clipboard text information is really no problem.
Alex