<p>What are some macros that you have found useful in Visual Studio for code manipulation and automation? </p>

[{'answer_id': 15107, 'author': 'RZachary', 'author_id': 1393, 'author_profile': 'https://Stackoverflow.com/users/1393', 'pm_score': 0, 'selected': False, 'text': '<p>You might want to add in code snippets as well, they help to speed up the development time and increase productivity.</p>\n\n<p>The standard VB code snippets come with the default installation. The C# code snippets must be downloaded and added seperately. (Link below for those)</p>\n\n<p>As far as macros go, I generally have not used any but the working with Visual studio 2005 book has some pretty good ones in there.</p>\n\n<p>C# Code snippets Link:\n<a href="http://www.codinghorror.com/blog/files/ms-csharp-snippets.7z.zip" rel="nofollow noreferrer">http://www.codinghorror.com/blog/files/ms-csharp-snippets.7z.zip</a> \n(Jeff Atwood provided the link)\nHIH</p>\n'}, {'answer_id': 15113, 'author': 'travis', 'author_id': 1414, 'author_profile': 'https://Stackoverflow.com/users/1414', 'pm_score': 3, 'selected': False, 'text': '<p>This is one of the handy ones I use on HTML and XML files:</p>\n\n<pre><code>\'\'\'\'replaceunicodechars.vb\nOption Strict Off\nOption Explicit Off\nImports EnvDTE\nImports System.Diagnostics\n\nPublic Module ReplaceUnicodeChars\n\n    Sub ReplaceUnicodeChars()\n        DTE.ExecuteCommand("Edit.Find")\n        ReplaceAllChar(ChrW(8230), "&amp;#8230;")   \' ellipses\n        ReplaceAllChar(ChrW(8220), "&amp;#8220;")   \' left double quote\n        ReplaceAllChar(ChrW(8221), "&amp;#8221;")   \' right double quote\n        ReplaceAllChar(ChrW(8216), "&amp;#8216;")   \' left single quote\n        ReplaceAllChar(ChrW(8217), "&amp;#8217;")   \' right single quote\n        ReplaceAllChar(ChrW(8211), "&amp;#8211;")   \' en dash\n        ReplaceAllChar(ChrW(8212), "&amp;#8212;")   \' em dash\n        ReplaceAllChar(ChrW(176), "&amp;#176;") \' °\n        ReplaceAllChar(ChrW(188), "&amp;#188;") \' ¼\n        ReplaceAllChar(ChrW(189), "&amp;#189;") \' ½\n        ReplaceAllChar(ChrW(169), "&amp;#169;") \' ©\n        ReplaceAllChar(ChrW(174), "&amp;#174;") \' ®\n        ReplaceAllChar(ChrW(8224), "&amp;#8224;")   \' dagger\n        ReplaceAllChar(ChrW(8225), "&amp;#8225;")   \' double-dagger\n        ReplaceAllChar(ChrW(185), "&amp;#185;") \' ¹\n        ReplaceAllChar(ChrW(178), "&amp;#178;") \' ²\n        ReplaceAllChar(ChrW(179), "&amp;#179;") \' ³\n        ReplaceAllChar(ChrW(153), "&amp;#8482;")   \' ™\n        \'\'ReplaceAllChar(ChrW(0), "&amp;#0;")\n\n        DTE.Windows.Item(Constants.vsWindowKindFindReplace).Close()\n    End Sub\n\n    Sub ReplaceAllChar(ByVal findWhat, ByVal replaceWith)\n        DTE.Find.FindWhat = findWhat\n        DTE.Find.ReplaceWith = replaceWith\n        DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument\n        DTE.Find.MatchCase = False\n        DTE.Find.MatchWholeWord = False\n        DTE.Find.MatchInHiddenText = True\n        DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxLiteral\n        DTE.Find.ResultsLocation = vsFindResultsLocation.vsFindResultsNone\n        DTE.Find.Action = vsFindAction.vsFindActionReplaceAll\n        DTE.Find.Execute()\n    End Sub\n\nEnd Module\n</code></pre>\n\n<p>It\'s useful when you have to do any kind of data entry and want to escape everything at once.</p>\n'}, {'answer_id': 32858, 'author': 'Scott Dorman', 'author_id': 1559, 'author_profile': 'https://Stackoverflow.com/users/1559', 'pm_score': 1, 'selected': False, 'text': '<p>This is one I created which allows you to easily change the Target Framework Version of all projects in a solution: <a href="https://web.archive.org/web/20170713162713/http://geekswithblogs.net:80/sdorman/archive/2008/07/18/visual-studio-2008-and-targetframeworkversion.aspx" rel="nofollow noreferrer">http://geekswithblogs.net/sdorman/archive/2008/07/18/visual-studio-2008-and-targetframeworkversion.aspx</a></p>\n'}, {'answer_id': 32868, 'author': 'FantaMango77', 'author_id': 2374, 'author_profile': 'https://Stackoverflow.com/users/2374', 'pm_score': 1, 'selected': False, 'text': '<p>I\'m using <a href="http://blog.jpboodhoo.com" rel="nofollow noreferrer">Jean-Paul Boodhoo</a>\'s <a href="http://blog.jpboodhoo.com/SmallUpdateToBDDMacro.aspx" rel="nofollow noreferrer">BDD macro</a>. It replaces whitespace characters with underscores within the header line of a method signature. This way I can type the names of a test case, for example, as a normal sentence, hit a keyboard shortcut and I have valid method signature.</p>\n'}, {'answer_id': 32884, 'author': 'John Richardson', 'author_id': 887, 'author_profile': 'https://Stackoverflow.com/users/887', 'pm_score': 3, 'selected': False, 'text': '<p>This is my macro to close the solution, delete the intellisense file, and reopen the solution. Essential if you\'re working in native C++.</p>\n\n<pre><code>Sub UpdateIntellisense()\n    Dim solution As Solution = DTE.Solution\n    Dim filename As String = solution.FullName\n    Dim ncbFile As System.Text.StringBuilder = New System.Text.StringBuilder\n    ncbFile.Append(System.IO.Path.GetDirectoryName(filename) + "\\")\n    ncbFile.Append(System.IO.Path.GetFileNameWithoutExtension(filename))\n    ncbFile.Append(".ncb")\n    solution.Close(True)\n    System.IO.File.Delete(ncbFile.ToString())\n    solution.Open(filename)\nEnd Sub\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/15056', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1185/']