I have a Word document that uses a phrase in two places. The one I want to find has a carriage return after it.
Is there a way to search for a phrase that includes the carriage return (newline)?
I have a Word document that uses a phrase in two places. The one I want to find has a carriage return after it.
Is there a way to search for a phrase that includes the carriage return (newline)?
Maybe something like this?
set targetText to "phrase I am looking for"
tell application "Microsoft Word"
activate
set docRange to find object of selection
execute find (docRange) find text targetText & "^p"
end tell
I don’t actually know what I’m doing, but a web search suggested it and it seems to work.