摘要: '以下创建ie对象,以及设置ie对象的一些属性set ie=wscript.createobject("internetexplorer.application","event_")ie.menubar=0 '取消菜单栏ie.addressbar=0 '取消地址栏ie.toolbar=0 '取消工具栏ie.statusbar=0 '取消状态栏ie.width=380 'ie对象宽度ie.height=500 'ie对象高度ie.resizable=0 '不允许用户改变窗口大小ie.navig 阅读全文
posted @ 2011-06-16 00:51 Sirrah 阅读(2005) 评论(0) 推荐(0) 编辑
摘要: 12345678910111213141516171819202122232425262728293031Function DelectDate()on error resume NextDim oExcel,oWb,oSheet,count,RowsCount,name,t,s,icount=0t=0Set oExcel= CreateObject("Excel.Application")Set oWb = oExcel.Workbooks.Open("C:\2.xls")'设置第一个sheet为当前Excel的活动表格Set oSheet = 阅读全文
posted @ 2011-06-16 00:50 Sirrah 阅读(4000) 评论(0) 推荐(0) 编辑
摘要: 12345678910111213141516171819202122232425262728Function FilesTree(sPath) Set oFso = CreateObject("Scripting.FileSystemObject") Set oFolder = oFso.GetFolder(sPath) Set oSubFolders = oFolder.SubFolders For Each oSubFolder In oSubFolderspath=oSubFolder.Pathname=oSubFolder.nameCall FilesTree1( 阅读全文
posted @ 2011-06-16 00:46 Sirrah 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 123456789101112131415161718192021Function SaveWebPage()Set web = CreateObject("InternetExplorer.Application")web.Visible = TrueFor i=1 to 10Dim WshShellset WshShell = CreateObject("WScript.Shell")url="www.baidu.com"web.Navigate urldoWscript.sleep 2000loop until web.read 阅读全文
posted @ 2011-06-16 00:42 Sirrah 阅读(1383) 评论(0) 推荐(0) 编辑
摘要: Function KillExcelProcess() on error resume Next CreateObject("WScript.Shell").Run "taskkill /f /im excel.exe " CreateObject("WScript.Shell").Run "taskkill /f /im Wscript.exe"End Function 阅读全文
posted @ 2011-06-16 00:37 Sirrah 阅读(1395) 评论(0) 推荐(0) 编辑
摘要: Function FilesTree(sPath) Dim i : i=0 on error resume Next Set oFso = CreateObject("Scripting.FileSystemObject") Set oFolder = oFso.GetFolder(sPath) Set oFiles = oFolder.Files For Each oFile In oFiles If Right(oFile.Path,3)="xls" Then Msgbox oFile.Path i=i+1 End ... 阅读全文
posted @ 2011-06-16 00:31 Sirrah 阅读(7280) 评论(0) 推荐(0) 编辑
摘要: on error resume NextConst MY_COMPUTER=&H11&Const WINDOW_HANDLE=0Const OPTIONS=0'设置我的电脑为根目录Set objShell=CreateObject("Shell.Application")Set objFolder=objShell.Namespace(MY_COMPUTER)Set objFolderItem=objFolder.SelfstrPath=objFolderItem.PathSet objShell=CreateObject("Shell.A 阅读全文
posted @ 2011-06-16 00:29 Sirrah 阅读(2699) 评论(0) 推荐(0) 编辑
摘要: on error resume NextSet objDialog=CreateObject("UserAccounts.CommonDialog")objDialog.Filter="仅支持xls格式文件|*.xls"objDialog.InitialDir="C:\"intResult=objDialog.ShowOpenIf intResult=0 Then Wscript.QuitElse If Right(objDialog.FileName,3)="xls" Then Wscript.Echo objD 阅读全文
posted @ 2011-06-16 00:26 Sirrah 阅读(1705) 评论(0) 推荐(0) 编辑
摘要: '---------------------------------------------------------------------------------'函数名称 : SendMail'函数功能 : 自动发送邮件功能'函数输入 : SendTo----收件人,多个收件人可使用";"隔开' MailTopic----邮件主题' MailBody----邮件内容,此处内容格式为Html' MailAttachment---邮件附件,多个附件可使用";"隔开'函数输出 : Boolea 阅读全文
posted @ 2011-06-16 00:13 Sirrah 阅读(4044) 评论(0) 推荐(0) 编辑