RSS feeds are more and more popular and as any site that respects itself, CodeProject also provides a nice RSS feed with information about the latest articles.
As Steven Hicks just noticed in the Lounge http://www.codeproject.com/lounge.asp#xx761109xx CodeProject RSS link is not so easy to notice. If you are a real CPA (CodeProjectAdict) you do want to see "What's new on CP" at any moment. And the best place to see it is of course in you VS.Net environment where you spend most of you time anyway. Plus that you don't have to open a new explorer window just to see if there is anything new on CP.
And if you could also see the latest news in the CodeProject style (colors, fonts) it would be even nicer.
Thus, to achive this goal I made a small XSL file to translate the RSS from CP to a nice formated HTML webpage that gets displayed inside VS.Net but a simple mouse click.
The macro is based 99% on the one provided by Davy Mitchell in his article Visual Studio .NET RSS Headline Viewer.
Function GetHTML(ByVal strPage As String) As String
If strPage.StartsWith("http://") Then
Dim oReq As System.Net.HttpWebRequest
Dim oResp As System.Net.HttpWebResponse
oReq = System.Net.HttpWebRequest.Create(strPage)
oResp = oReq.GetResponse
Dim sr As New StreamReader(oResp.GetResponseStream)
Else Dim sr As StreamReader = New StreamReader(strPage)
Public Sub RefreshRSS()
Dim RDFText As String
Dim objTextDoc As TextDocument
Dim objEP As EditPoint
Call DTE.ItemOperations.NewFile("General\Text File")
objTextDoc = DTE.ActiveDocument.Object("TextDocument")
objEP = objTextDoc.StartPoint.CreateEditPoint
RDFText = GetHTML(http://www.codeproject.com/ & _
objEP.Insert("<?xml-stylesheet type=""text/xsl"" " & _
"href=""change.xsl""?>" + vbCrLf)
RDFText = RDFText.Replace("©", "(c)")
Dim ItemOp As ItemOperations
ItemOp = DTE.ItemOperations
Catch err As System.Exception
- Unzip the files to a folder of your choice (C:\temp) for example.
- Drop this macro in your macro editor, assign the macro to a button and update the paths in the macro with the path where you unziped the files.
- Click the button :).
8 years commercial experience out of which 7 years developing financial applications for different stock exchanges.
5 years VC++ and about 2.5 years C# experience and a bit of Java.
Now working with the fantastic guys from Readify
, a group of elite consultants specialising in technical readiness.
Keeping a blog at:
Hawkeye - The .Net Runtime Object Editor
- A developer's best tool.
Keeping myself busy with my site: