dcostelloe Level: VB Guru
 Registered: 11-06-2002 Posts: 74
|
Create Macro To Build Functions/Subs Archived to Disk
Under Tools Select Macro then Macro Explorer
Right Click Macros (Top) and Select New Macros Project.
Call it what you want for this we will call it sample
Public Module Sample
Sub AddFunction()
DTE.UndoContext.Open("Add Function")
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Text = "Public Function YourFunction() As Boolean"
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Text = "Return True"
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Text = "End Function"
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.NewLine()
DTE.UndoContext.Close()
End Sub
____________________________
Life is but a merry go round
around and around :-)
Visit us today:
http://www.welford-costelloe.com
|