Your attachment has 'Command:' and 'Some text' on the same line, so it's unreasonable to expect the macro coded to deal with the document as supplied to put them on different rows when you didn't say that's what you wanted. Furthermore, your attachment has a non-breaking space between 'Command:' and 'Some text', just like the others, not the standard space you're now saying it has. To handle both scenarios, you could change:
.Text = ":[^s]{1,}"
to:
.Text = ":[ ^s]{1,}"
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|