views:

12

answers:

1

Hi, I'm using Visual Studio 2008 and I split my text editor into two vertical text editors. I thought it would be useful to have a macro that re-size the active text editor to take up most of the screen but I haven't gotten very far. I get an error whenever I try to change the width oh a text editor.

DTE.ActiveWindow.Width = 800

And I'm not sure how to identify weather the active window is a text editor or not.

Anyone know what I'm doing wrong?

thanks

+1  A: 

Check the Kind property. Should be "Document" for text editors, I suppose:

If DTE.ActiveWindow.Kind = "Document" Then
    ' ActiveWindow is a text editor '
End If
Fredrik Mörk
Thanks! Anyone know why setting the width is causing an error?
rob