View Single Post
 
Old 07-15-2017, 10:11 AM
StephenRay StephenRay is offline Windows 7 64bit Office 2010 64bit
Advanced Beginner
 
Join Date: Jan 2012
Location: Overland Park, Kansas
Posts: 53
StephenRay is on a distinguished road
Default

Greg, Thanks for your reply. Good idea! I didn't know it was possible. I will try it on Monday at work. In the mean time, I will have to study what you wrote with a good book, "Mastering VBA for Microsoft Office 2016" by Richard Mansfield.
But I get the idea, I think. You made what was highlighted/selected - a variable, oRng. Then you trim it. Then you copy it into the clipboard. Finally you put any spaces back into the highlighted text on the document.
But I don't see any use for the first statement:
Dim oClipboard As DataObject
Is it necessary?
Thank you so much!
Reply With Quote