'------------------------------------------------------------------------------
'FILE DESCRIPTION: Copyright notice macro AddIn
'------------------------------------------------------------------------------
'DESCRIPTION: Print text. Set param to TRUE to insert a new line
Function PrintText( s,insertline )
ActiveDocument.Selection = s
if insertline then
ActiveDocument.Selection.NewLine
end if
end function
Sub Copyright()
'DESCRIPTION: Inserts Copyright information
Dim win
Set win=ActiveWindow
if win.type <> "Text" Then
MsgBox "This macro cannot be run without an active text editor"
else
ActiveDocument.Selection.LineUp
ActiveDocument.Selection.NewLine
'change the following to customise copyright notice.
'Name of author
Author="Amit Dey"
'Author's email
Email="amitdey@crosswinds.net"
'brief description
Description="Blah Blah Blah..."
'Copyright notice text
PrintText "////////////////////////////////////////////////////////////////////////////",TRUE
PrintText "// Copyright : " & Author & " " & Year(Now), TRUE
PrintText"//",TRUE
PrintText "// Email :" & Email,TRUE
PrintText"//",TRUE
PrintText "// This code may be used in compiled form in any way you desire. This",TRUE
PrintText "// file may be redistributed unmodified by any means PROVIDING it is ",TRUE
PrintText "// not sold for profit without the authors written consent, and ",TRUE
PrintText "// providing that this notice and the authors name is included.",TRUE
PrintText "//",TRUE
PrintText "// This file is provided 'as is' with no expressed or implied warranty.",TRUE
PrintText "// The author accepts no liability if it causes any damage to your computer.",TRUE
Printtext "//",TRUE
PrintText "// Do expect bugs.",TRUE
PrintText "// Please let me know of any bugs/mods/improvements." ,TRUE
PrintText "// and I will try to fix/incorporate them into this file.",TRUE
PrintText "// Enjoy!",TRUE
PrintText"//",TRUE
PrintText "// Description : " & Description & " ",TRUE
PrintText "////////////////////////////////////////////////////////////////////////////",TRUE
End If
End Sub