Sub InsertGuid()
Dim objTextSelection As TextSelection
objTextSelection = CType(DTE.ActiveDocument.Selection(), EnvDTE.TextSelection)
objTextSelection.Text = System.Guid.NewGuid.ToString.ToUpper(New System.Globalization.CultureInfo("en", False))
End Sub
The following link contains detail on how to assign it to a keypress or a toolbar button.
Assigning VBScript Macros to Toolbar Buttons or Key Sequences
No comments:
Post a Comment