Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7973493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:07:14+00:00 2026-06-04T08:07:14+00:00

In Visual Studio 2008 I would regularly record a macro to (for example) take

  • 0

In Visual Studio 2008 I would regularly record a macro to (for example) take a list of class member declarations and turn it into a list of property definitions.

Using Visual Studio 2010, the macro recorder appears to ignore a 2nd press of the Home key (the 1st should take you to the start of the text on the line, the 2nd should take you to the character position 1 on the line).

Putting the cursor at the end of a tabbed line, starting to record and pressing “Home” twice results in the following (it doesn’t matter whether the tabs are actual tabs or spaces)…

Sub TemporaryMacro()
    DTE.ActiveDocument.Selection.StartOfLine(VsStartOfLineOptions.VsStartOfLineOptionsFirstText)
End Sub

When what it should really put is…

Sub TemporaryMacro()
    DTE.ActiveDocument.Selection.StartOfLine(VsStartOfLineOptions.VsStartOfLineOptionsFirstText)
    DTE.ActiveDocument.Selection.StartOfLine(VsStartOfLineOptions.VsStartOfLineOptionsFirstColumn)
End Sub

I know I could just go in and edit it, but as I normally record something and then immediately run it multiple times, that is not appealing. And I’m not aware of any keypress that will take you to the first column.

Can anybody confirm if this is a fault with the macro recorder in VS2010, or am I doing something really stupid?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:07:16+00:00Added an answer on June 4, 2026 at 8:07 am

    This does not work for me, either, meaning it does the same thing for me as it does for you, and the macro does not play back correctly.

    As a workaround, I use the key combo [end, right, up] to go to the first character position when recording a macro. This translates into:

        DTE.ActiveDocument.Selection.EndOfLine()
        DTE.ActiveDocument.Selection.CharRight()
        DTE.ActiveDocument.Selection.LineUp()
    

    The only time this doesn’t work is when you operate on the last line of the file. If you anticipate that happening you could use [up, end, right] instead:

        DTE.ActiveDocument.Selection.LineUp()
        DTE.ActiveDocument.Selection.EndOfLine()
        DTE.ActiveDocument.Selection.CharRight()
    

    Of course, this version would not operate correctly on the first line of the file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a tool (macro, extension) for Visual Studio 2008 that would reformat
I'm using Visual Studio 2008 (C++) and would like to produce a list of
We are using Visual Studio 2008 and would like to know if there is
I'm working in Visual Studio 2008 and I would like for Edit > Outlining
I'm using Visual Studio 2008 Express and I would like Visual Studio (or perhaps
I have a Visual Studio 2008 C++ project where I would like to copy
I would like to install Visual Studio 2008 on a PC with an existing
I would like to use Visual Studio 2008 to the greatest extent possible while
How can I backup my code bookmarks? (Visual Studio 2008/2010) I would like to
Visual Studio 2008 ships with SQL 2005. I would like to integrate SQL 2008.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.