T
Tom Brubaker
The Word Search&Replace dialog has a nice feature for searching for
text WITH a given format, WITHOUT a given format, or blindly, and for
replacing with or without new formatting.
Macros access provide the .Font and .Format attributes, but it doesn't
seem to me that they are able to achieve the same results. For
instance, suppose I want to search for all text that is NOT italicized
and replace it with the same text in bold. Two plausible solutions
fail:
(1)
..Font.Italics = False
..Replacement.Font.Bold = True
..Format = True
-> selects all text and boldifies it. Failed to select the non-italics
only.
(2)
..Font.Italics = False
..Replacement.Font.Bold = True
..Format = False
-> again selects all text, but does not apply any bolding. Failed to
select the non-italics only, and failed to apply bolding.
Surely someone has encountered this before. It seems like negative
format searches ("Not bold", "Not Italics", etc.) simply don't work via
macro Any insights?
text WITH a given format, WITHOUT a given format, or blindly, and for
replacing with or without new formatting.
Macros access provide the .Font and .Format attributes, but it doesn't
seem to me that they are able to achieve the same results. For
instance, suppose I want to search for all text that is NOT italicized
and replace it with the same text in bold. Two plausible solutions
fail:
(1)
..Font.Italics = False
..Replacement.Font.Bold = True
..Format = True
-> selects all text and boldifies it. Failed to select the non-italics
only.
(2)
..Font.Italics = False
..Replacement.Font.Bold = True
..Format = False
-> again selects all text, but does not apply any bolding. Failed to
select the non-italics only, and failed to apply bolding.
Surely someone has encountered this before. It seems like negative
format searches ("Not bold", "Not Italics", etc.) simply don't work via
macro Any insights?