View Single Post
 
Old 01-21-2019, 01:19 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You can jump over the compound words causing the 5160 error by changing:
.Execute
to:

On Error Resume Next
.Execute
On Error GoTo 0

Limiting the code to Selections will take more work. It would have been nice if you'd said up front that's what you wanted to do.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote