sub 宏1() dim p,n,st as worksheet p="c:\" '文件所在位置,你可能需要修改,没必须是\ n=dir(p & "&.xls*") do while n<>"" with workbooks.open(p & n) for each st in .sheets if st.name="施工记录" or st.name="施工记录 (2)" or st.name="施工记录 (3)" then st.printout next st .close end with n=dir loop end sub追问