;给Word加密码 $oAppl = ObjCreate("Word.Application") $oDoc = $oAppl.Documents.Open("e:\abc.docx");文件名自己修改 $oDoc.Password="1234" $oDoc.Save $oAppl.Quit ;给Excel加密 $oExcel = ObjCreate("Excel.Application") $oWorkbook = $oExcel.Workbooks.Open("e:\abc.xlsx") $oExcel.ActiveWorkbooks.Protect="1234" $oWorkbook.Save $oExcel.Quit
举报
$oWorkbook.Password="1234"
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2024-11-22 10:15 , Processed in 0.102722 second(s), 23 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.