I have been looking for a way to read the entire contents of the text buffer.
I have a reference to the Document Object I want to read but do not know how
to do this.
I need to entire text of the current document... does anyone know how I can
do this?
Thanks,
Justin J. Vogt
Here we go!:
1) Cast Document.Object to TextDocument
2) Get TextDocument.StartPoint
3) Create EditPoint from TextPoint with CreateEditPoint
4) Call GetText method passing TextDocument.EndPoint

Signature
Carlos J. Quintero
MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
>I have been looking for a way to read the entire contents of the text
>buffer.
[quoted text clipped - 9 lines]
>
> Justin J. Vogt
JavaKid - 17 Feb 2005 14:13 GMT
Thanks Carlos, that did the trick...
In case anyone wants to know here's the code that used in Whidbey:
TextDocument textDocument =
(TextDocument)projectItem.Document.Object("TextDocument");
EditPoint editPoint = textDocument.StartPoint.CreateEditPoint();
string bufferText = editPoint.GetText(textDocument.EndPoint);
Justin J. Vogt
http:\\javakid.blogspot.com
> Here we go!:
>
[quoted text clipped - 16 lines]
> >
> > Justin J. Vogt