View Single Post
 
Old 04-07-2021, 06:07 AM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,369
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

As indicated in the code, it is performing a wildcard Find, for which see: Finding and replacing characters using wildcards

In [!^13]{1,}, the:
• [] pair says to find any instance of whatever is defined between them
• ! says to NOT find what follows
• ^13 represents ASCII 13, which is the first character of the ASCII 13 & 11 pair that together create a paragraph break
• {1,} says to continue finding such characters for as long as they go.

Hence:
.Text = "Organization:[!^13]{1,}"
tells Word to find 'Organization:' followed by any series of characters that do not include a paragraph break.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote