Celia, Thanks for the help ...


Posted by Marc Hennebery on December 11, 2000 8:59 AM

The search for a string, and hide the rows that don't match works great. I modified it to select the unhidden rows and paste them to a worksheet to be formatted and pasted into a Word template. Is there a way to add the search string to the Word document's name when I save it? I currently just add the date when I save it, but this precludes running more than one a day.



Posted by Celia on December 11, 2000 4:37 PM


I'm not sure if this is what you mean or even whether it works, but in the same macro, if you want to save a workbook and include the "lookFor" value in the file name try :-
ActiveWorkbook.SaveAs Filename:="C:\" & info & ".Doc"

Or you could paste the "lookFor" value into a cell and then (in a different macro if you want):-
ActiveWorkbook.SaveAs Filename:="C:\" & Range("A1")& ".Doc"

Celia