<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>VS 2003 Tip #2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx</link><description>Vs 2003 allows you to write macros that can automate the IDE. You can acess these through the Macro Explorer - just go to View-&amp;gt;Other windows-&amp;gt;Macro Explorer and look through the Macros already present there. You'll see we provide a set of sample</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: VS 2003 Tip#2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#75789</link><pubDate>Wed, 18 Feb 2004 21:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:75789</guid><dc:creator>Me</dc:creator><description>I tried once to create a macro to toggle the &amp;quot;Enable HTML Validation&amp;quot; setting in in Tools-Options-Text Editor-HTML/XML-HTML Specific.  The macro recorder only recorded &lt;br&gt;&lt;br&gt;   DTE.ExecuteCommand(&amp;quot;Tools.Options&amp;quot;) &lt;br&gt;&lt;br&gt;which was useless.   Couldn't find any useable property to achieve this so I gave up with the impression that the IDE automation in VS.NET leaves a lot to be desired.</description></item><item><title>re: VS 2003 Tip#2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#75811</link><pubDate>Wed, 18 Feb 2004 21:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:75811</guid><dc:creator>Wes</dc:creator><description>I'm a C# developer and I know it exists and I have written various little macros.  I would like to see the ability to write macros in C#.  Not that I'm a VB hater but I just prefer C#.</description></item><item><title>re: VS 2003 Tip#2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#75827</link><pubDate>Wed, 18 Feb 2004 22:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:75827</guid><dc:creator>Louis Parks</dc:creator><description>I knew it was there...I've seen the vsmacros folder.  I've never used them though.</description></item><item><title>re: VS 2003 Tip#2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#75863</link><pubDate>Wed, 18 Feb 2004 22:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:75863</guid><dc:creator>milbertus</dc:creator><description>I knew it was there, too, and was initially surprised that macros could only be written using VB (given the whole &amp;quot;every language is equal&amp;quot; .NET philosophy).  However, assuming that VS uses VSA for its automation and macros, I recall reading somewhere that C# can't be used for VSA objects, due to some late binding issue.  Which sucks, but I'll deal.</description></item><item><title>re: VS 2003 Tip#2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#75884</link><pubDate>Wed, 18 Feb 2004 23:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:75884</guid><dc:creator>Blair Stephenson</dc:creator><description>I use a macro developed by someone else, that copied the compiled assembly to a specific location. (1.0 days)&lt;br&gt;&lt;br&gt;We use file references as have found less issues then using project references.  This helps with that process.</description></item><item><title>re: VS 2003 Tip#2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#75895</link><pubDate>Wed, 18 Feb 2004 23:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:75895</guid><dc:creator>Tony Chow</dc:creator><description>I use macros to:&lt;br&gt;&lt;br&gt;1) Insert bracket pairs and return cursor to the line between the brackets.  Now my code is full of one-liner brackets!&lt;br&gt;&lt;br&gt;2) Insert GUIDs into code.&lt;br&gt;&lt;br&gt;3) Mark critical comments with name and date, such as &amp;quot;[Tony Chow 5/4/2003]&amp;quot;&lt;br&gt;&lt;br&gt;4) Perform massive search and replace operations that require more than one pass of regular expression queries.&lt;br&gt;&lt;br&gt;So there.</description></item><item><title>re: VS 2003 Tip#2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#75921</link><pubDate>Thu, 19 Feb 2004 00:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:75921</guid><dc:creator>James Geurts</dc:creator><description>I wrote and use a macro that auto increments the build number in an AssemblyInfo.cs file.  It's located here: &lt;a target="_new" href="http://blogs.biasecurities.com/jim/archive/2003/10/08/166.aspx"&gt;http://blogs.biasecurities.com/jim/archive/2003/10/08/166.aspx&lt;/a&gt;</description></item><item><title>re: VS 2003 Tip#2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#76164</link><pubDate>Thu, 19 Feb 2004 09:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:76164</guid><dc:creator>Roland Weigelt</dc:creator><description>I often use temporary macros. And I couldn't live without some macros I wrote for expanding/collapsing #regions in C# code (located here: &lt;a target="_new" href="http://weblogs.asp.net/rweigelt/archive/2003/07/06/9741.aspx"&gt;http://weblogs.asp.net/rweigelt/archive/2003/07/06/9741.aspx&lt;/a&gt;).</description></item><item><title>re: VS 2003 Tip#2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#76347</link><pubDate>Thu, 19 Feb 2004 16:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:76347</guid><dc:creator>Dan Szepesi</dc:creator><description>There is a difference between knowing about them, and kind of realizing that they can be used for pretty neat purposes.&lt;br&gt;&lt;br&gt;I knew they were there, but never really took the time to think about how I could exploit their use.  Examples are a great way to kick start that thought process - thanks for bringing this up.</description></item><item><title>re: VS 2003 Tip #2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#79310</link><pubDate>Tue, 24 Feb 2004 19:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:79310</guid><dc:creator>Frank Hileman</dc:creator><description>I have a whole boatload of macros I use all the time for writing C# code. Originally I wrote them for C++ in VS6 and ported when VS.NET came out. I use them with a toolbar and pen, but anyone who wants to use them with keyboard accelerators can do that. These macros save me a lot of time by writing all control structures, commenting, doc comments, modifiers, property get and sets, everything.&lt;br&gt;&lt;br&gt;I uploaded the file to:&lt;br&gt;&lt;a target="_new" href="http://www.vgdotnet.com/Editing.vb"&gt;http://www.vgdotnet.com/Editing.vb&lt;/a&gt;&lt;br&gt;&lt;br&gt;To use them from the toolbar, run the aaAddToolbarAndButtons. Then right click on your empty toolbar area and check the &amp;quot;Editing Macros&amp;quot; toolbar to make it visible. You will see some cryptic menu titles (3 letters each for space), but if you click on each menu, you will see that the items within each menu are completely self-explanatory. Many will operate on the currently selected text, if you have any. All code insertion macros insert new code below the current line.&lt;br&gt;&lt;br&gt;These macros are also great for people who control Visual Studio with voice recognition. Just associate them with keyboard shortcuts, and make your VR software spit out those shortcuts.&lt;br&gt;&lt;br&gt;Thanks so much for making macros so powerful in VS! They make a huge difference for me!&lt;br&gt;&lt;br&gt;Here is a picture of the cryptic toolbar, on the right-hand side:&lt;br&gt;&lt;a target="_new" href="http://www.vgdotnet.com/screen1.png"&gt;http://www.vgdotnet.com/screen1.png&lt;/a&gt;&lt;br&gt;</description></item><item><title>re: VS 2003 Tip #2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#80078</link><pubDate>Wed, 25 Feb 2004 23:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:80078</guid><dc:creator>William Robertson</dc:creator><description>I found the macros recently and use them often&lt;br&gt;&lt;br&gt;Placing Region blocks around methods and properties&lt;br&gt;&lt;br&gt;Moving my web.config file over from release mode settings to debug mode settings (I found the preprocessor directives don't work well in there *smirk*)&lt;br&gt;&lt;br&gt;Grabbing my select list from a stored procedure and populating text boxes. (naming is consistent)&lt;br&gt;&lt;br&gt;and many more...&lt;br&gt;</description></item><item><title>re: VS 2003 Tip #2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#82837</link><pubDate>Tue, 02 Mar 2004 20:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:82837</guid><dc:creator>Steve Hiner</dc:creator><description>I've been waiting for macros in VB for years so now that I have them I've written a few.  Mostly little utility fuctions that do things like wraping a selection in a Region or a Try..Catch, changing a private or public variable into a property.  &lt;br&gt;&lt;br&gt;My personal favorite is one that flips the selecting around an assignment.  So I can take something like:&lt;br&gt;Textbox1.Text = m_Varible1&lt;br&gt;Textbox2.Text = m_Varible2&lt;br&gt;&lt;br&gt;and swap it around to:&lt;br&gt;m_Varible1 = Textbox1.Text&lt;br&gt;m_Varible2 = Textbox2.Text&lt;br&gt;&lt;br&gt;I used to have to do that a lot in the VB5/6 days when making custom controls - all the property bucket junk.  At the time I would have loved to have a macro that would handle it.  It's also quite useful when doing DB work when you often pull values out of a row and later need to put the values back in.&lt;br&gt;&lt;br&gt;I really wish there was a site that would make it easy for all of us to share our macros.  I think MS would be wise to create such a site, even if it was just a new section at gotdotnet.com.</description></item><item><title>re: VS 2003 Tip #2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#83361</link><pubDate>Wed, 03 Mar 2004 18:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:83361</guid><dc:creator>John S.</dc:creator><description>Use them. Love it Thanks!  &lt;br&gt;&lt;br&gt;The most popular here are:&lt;br&gt;- Automating Word to generate a push report of my checked-out files (in our preferred style) before starting my pushes.  &lt;br&gt;- Copying build output to differnt folders.&lt;br&gt;- Minor source tweaks as others have mentioned.&lt;br&gt;</description></item><item><title>re: VS 2003 Tip #2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#88879</link><pubDate>Sat, 13 Mar 2004 02:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:88879</guid><dc:creator>Bill Menees</dc:creator><description>I've written a lot of macros for work and home.  I have macros to:&lt;br&gt;    Wrap the selected block in a region.&lt;br&gt;    Add a formatted TODO comment.&lt;br&gt;    Build just the startup project and its dependencies.&lt;br&gt;    Add a formatted document header/revision history block.&lt;br&gt;    Configure a C# project's setting to match our corporate standards.&lt;br&gt;    Do many other repetitive things that I have to do.&lt;br&gt;&lt;br&gt;Some of these I've ported up from VC6's VBA macros.  Some I've written since VS2002 came out.  Almost every month I find something new I can do with VS macros.&lt;br&gt;&lt;br&gt;FWIW, I also use the TemporaryMacro feature constantly, and I occasionally save off its output as a starting point for a permanent macro.&lt;br&gt;&lt;br&gt;My only two complaints are that I still have to write in VB.NET and that there's no support for a form designer.  The reason for the first point should be obvious to someone on the C# team.  The reason for the second point is that some of my macros need to popup dialogs, and I have to build them by hand.  Actually, I build the dialogs in a new VB.NET Windows Application, and then I copy the code into my macro project and use the form class from there.&lt;br&gt;&lt;br&gt;But overall, the macro support in VS rocks and is absolutely critical to how I do my work and how my team members work.&lt;br&gt;&lt;br&gt;</description></item><item><title>Shaykat's Visual Studio 2003 Tips</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#89285</link><pubDate>Sun, 14 Mar 2004 12:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:89285</guid><dc:creator>Code/Tea/Etc...</dc:creator><description /></item><item><title>Shaykat's Visual Studio 2003 Tips</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#89291</link><pubDate>Sun, 14 Mar 2004 12:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:89291</guid><dc:creator>Code/Tea/Etc...</dc:creator><description /></item><item><title>re: VS 2003 Tip #2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#89393</link><pubDate>Sun, 14 Mar 2004 19:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:89393</guid><dc:creator>Jon Galloway</dc:creator><description>This got me fired up to start using my macros again. When I did, I found that they've stopped working - when I try to run them, the little macro notification tray icon flickers and disappears, but the macro doesn't do anything (no affect on code window). No errors, messageboxes, etc.&lt;br&gt;&lt;br&gt;When I try to debug the macros, code execution doesn't stop at breakpoints.&lt;br&gt;&lt;br&gt;Anyone else seen this? Any suggestions?</description></item><item><title>re: VS 2003 Tip #2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#89571</link><pubDate>Mon, 15 Mar 2004 02:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:89571</guid><dc:creator>Bill Menees</dc:creator><description>I saw that when I installed VS2002 after VS2003.  VS2002 broke the macro support for VS2003.  I had to reinstall VS2003 to get things reregistered correctly.</description></item><item><title>re: VS 2003 Tip #2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#89760</link><pubDate>Mon, 15 Mar 2004 14:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:89760</guid><dc:creator>Sonia Kaushal</dc:creator><description>hi read this and do u r project about micro </description></item><item><title>re: VS 2003 Tip #2: Macros</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#89887</link><pubDate>Mon, 15 Mar 2004 18:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:89887</guid><dc:creator>Tony Stewart</dc:creator><description>I new to macros writing and just want to set up one to insert signatures in new emails, can and how is this done?</description></item><item><title>Shaykat's Visual Studio 2003 Tips</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#220133</link><pubDate>Wed, 25 Aug 2004 13:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:220133</guid><dc:creator>Code/Tea/Etc.</dc:creator><description /></item><item><title> Shaykatc s WebLog VS 2003 Tip 2 Macros | debt consolidator</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/18/75736.aspx#9788546</link><pubDate>Fri, 19 Jun 2009 17:50:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9788546</guid><dc:creator> Shaykatc s WebLog VS 2003 Tip 2 Macros | debt consolidator</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://mydebtconsolidator.info/story.php?id=8136"&gt;http://mydebtconsolidator.info/story.php?id=8136&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>