Click here to Skip to main content
15,354,313 members
Articles / Database Development / SQL Server
Article
Posted 23 Jan 2005

Stats

25.2K views
16 bookmarked

Development Inline Comment while working in team

Rate me:
Please Sign up or sign in to vote.
2.04/5 (8 votes)
23 Jan 20051 min read
Inline Development Comments Automation

Introduction

Many a times, it happens when we work on a big project and the work is done by more than one member of the team.. It may happen that the code is getting reviewed and edited by more than one member of the team. In the time like this, it is very necessary to add comment above the added code with developer name and date-time with the inline logic due to which code edition or addition is performed... For this, a simple macro can be developed which can later be associated with a key-stroke so that it becomes very easy to add the inline comment...

Im working as a team leader in a sw-dev company and have made it compulsory to add this kind of comment whenever any existing code is changed and it has proved a damn good way to manage projects efficiently...
 

Using the code

Creating the macro named comment and pasting the code below will work fine...

//
'------------------------------------------------------------------------------
'FILE DESCRIPTION: New Macro File
'------------------------------------------------------------------------------

Sub comment()
'Begin Recording
ActiveDocument.Selection = "//============================================================//"
ActiveDocument.Selection.NewLine
ActiveDocument.Selection = "//Development By : Jigar Mehta"
ActiveDocument.Selection.NewLine
ActiveDocument.Selection = "//Date : [" & now() & "]"
ActiveDocument.Selection.NewLine
ActiveDocument.Selection = "//============================================================//"
'End Recording
End Sub
//

Points of Interest

Now one can map the macro 'comment' with key-stroke... I have made a standard as [Ctrl + Shift + F].. So, while coding when anybody presses that, a whole four line comment with developer name and date-time will be inserted in the code...

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Jigar Mehta
Web Developer
India India
Completed my M.Sc. in Computer Application and Information Technology and was giving my services to GAYTES Information Systems Private Ltd. - developing telecommunication solutions, like Voicemail Systems, IVRS, Call Center Applications, Unified Messaging etc, worked as Team Leader. Currently giving my services to VARAHA Systems working on embedded platform.

Comments and Discussions

 
Generalsmall article but nice for how wants to know how to write macro Pin
Sudhir Mangla24-Jan-05 18:03
professionalSudhir Mangla24-Jan-05 18:03 
GeneralRe: small article but nice for how wants to know how to write macro Pin
Jigar Mehta24-Jan-05 18:13
MemberJigar Mehta24-Jan-05 18:13 
Thanks for the comment..

But this is what I found.. Short and Sweet... and yes, this macro has proven the best for my team's development..

Jigar Mehta
(jigarmehta@gatescorp.com)

Software Developer
Gates Information Systems
India

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.