Search code examples
visual-studio-2015visual-studio-extensionsvsix

How to open the Visual Studio Editor Programmatically in a VSIX project


I am working on a VSIX(Visual Studio Extension) project where I am fetching html text from a Service. I need to open the retrieved html text in the Visual Studio Editor. Any idea on how to achieve it or any sample code ?

Thanks


Solution

  • You can save the text to a .html file and then open it in the VS editor with DTE.ItemOperations.OpenFile(file);