Here is what I currently have in the macro. When the macro finds 'PAGE ', I want it to execute (this will remove the line in my file that has 'PAGE '). When the macro does not find 'PAGE ', I do not want it to execute the functions below and instead display "String not found" or something to indicate that 'PAGE ' no longer exists in my file.
_command RemoveHeaders() name_info(','VSARG2_MACRO|VSARG2_MARK|VSARG2_REQUIRES_MDI_EDITORCTL)
{
_macro('R',1);
find('PAGE ','I>');
_deselect();
cursor_up();
begin_line_text_toggle();
deselect();
_select_char('','E');
cursor_down(5);
select_it('CHAR','','E');
delete_selection();
}