Look at the CodeModule Object. I then found the following on the net by searching for vba codemodule delete word. No idea if it works:
\n\nSub Remove(ByVal MacroName As String)\n    Dim vbc As VBComponent\n    Dim MyMacro As String\n\n    Set vbc = VBE.ActiveVBProject.VBComponents("ThisDocument")\n    With vbc.CodeModule\n        .DeleteLines .ProcStartLine(MacroName, vbext_pk_Proc), _\n            .ProcCountLines(MacroName, vbext_pk_Proc)\n    End With\n\nEnd Sub\n