Can someone give me some sample code for Visual Studio Extensibility where I can grab the text from a document, when the Save event ends, and run a script in C # with that text
You can subscribe to the DocumentSaved event:
events = DTE.Events;
documentEvents = events.DocumentEvents;
documentEvents.DocumentSaved += OnDocumentSaved;
In the OnDocumentSaved handler with EnvDTE.Document you can get the document path as doc.FullName.
To get text from EnvDTE.Document:
TextDocument td = (TextDocument)(doc.Object("TextDocument"));
var p = td.StartPoint.CreateEditPoint();
string s = p.GetText(td.EndPoint);
See In VisualStudio DTE, how to get the contents of the ActiveDocument? and https://vlasovstudio.com/visual-commander/extensions.html for complete samples.