View Single Post
 
Old 01-21-2024, 05:00 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,338
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 really shouldn't be working with windows and even more so with selections. You also have a great deal of redundant code. Even the copy/paste processes could be replaced with the FormattedText method.

See, for example:
https://www.msofficeforums.com/word-...-multiple.html
https://www.msofficeforums.com/word-...n-strings.html
https://www.msofficeforums.com/word-...-document.html
https://www.msofficeforums.com/word-...documents.html
https://www.msofficeforums.com/word-...ts-length.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote