Pratish Nair
Pratish Nair

Reputation: 111

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

Upvotes: 0

Views: 1240

Answers (2)

Sergey Vlasov
Sergey Vlasov

Reputation: 27900

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

Upvotes: 3

Greg Trevellick
Greg Trevellick

Reputation: 1401

Take a look at AutoFindReplace extension which opens existing files in the editor window. You can download it from the VS Gallery.

Upvotes: 2

Related Questions