2012-03-21 11 views
6

Visual Studio 2008用にいくつかのAddInまたはExtensionがあり、ファイルの最後までマクロを実行できますか? CTRL + SHIFT + Pキーを押しながらファイルの終わりに達するまで待っています。Visual Studioでファイルの最後までマクロを実行

+1

あなたは無料ではありませんソリューションを受け入れますか? (外部エディタ) – Steve

+0

私は外部編集者とは行かないでしょう。これをサポートする自由な選択肢がたくさんあるからです。だからVisual Studio 2008は間違いなくファイルの最後まで実行をサポートしていませんか?誰でもVisual Studio 2010の状況を知っていますか? – kape123

+0

よろしくお願いします。下のクリスチャンからの答えは本当に良いです。 – Steve

答えて

5

あなたは、マクロを記録し、マクロIDE(Altキー+ F11)を開き、このようなループにあらかじめ記録されたマクロを置くことができます:

Sub TemporaryMacro() 
    selection = DTE.ActiveDocument.Selection() 
    anchorPoint = selection.AnchorPoint.CreateEditPoint 
    selection.EndOfDocument(True) 
    endPoint = selection.BottomPoint.CreateEditPoint() 
    selection.MoveToPoint(anchorPoint) 

    Do While True 
     isEOF = DTE.ActiveDocument.Selection.TopPoint.CreateEditPoint().Line = endPoint.Line 
     If (isEOF) Then 
      Exit Do 
     End If 

     ' Prerecorded macro 
     DTE.ActiveDocument.Selection.Text = " " 
     DTE.ActiveDocument.Selection.LineDown() 
     DTE.ActiveDocument.Selection.CharLeft() 
     ' End of prerecorder macro 

    Loop 
End Sub 
+0

お礼ありがとうございます - 私は答えが嫌いです。 – kape123

関連する問題