Hey Malcolm,

I see...

Ok, just tested without the htm file and it works like it did for you. My apologies. What happened for me was, since I received the SQL syntax error, I looked through all the code and saw that along the way and figured I needed to create the htm file myself.

And just to tweak Stan's code a little, I changed the htm file from opening in IE to whatever the default browser is (I don't like IE). So mine opens in FF.

Also, I commented the code a little to help you (Malcolm, and whoever else reads this) and me to better understand this. Also, check out the Log Parser help file. Look for titles "XML Input Format Fields; XML Input Format Parameters; XML Output Format Parameters; XML Output Format". Stan, if something I said was wrong in the commented code, please correct me
[vba]Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, _
ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long

Private Const SW_NORMAL = 1

Sub lp()
'set reference to logparser [c:\Program Files\LogParse 2.2\logparser.dll]
'also set references to Microsoft HTML Object, Microsoft Internet Controls

Dim cURL As String

f = ActiveWorkbook.Path & "\lp.htm"
f1 = ActiveWorkbook.Path & "\rss.tpl"
Set oLog = CreateObject("MSUtil.LogQuery")
cURL = Range("A4").Value
Set oInput = CreateObject("MSUtil.LogQuery.XMLInputFormat.1")
Set oOutput = CreateObject("MSUtil.LogQuery.TemplateOutputFormat.1")

' Sets the tpl file to output the information to
oOutput.tpl = f1
' FileMode = 1 means that the tpl file will be overwritten
oOutput.filemode = 1
' Tree mode is a certain way the Input reads the XML code
oInput.fMode = "Tree"
' From Help: Specifying "XPath" causes the XML input format to create field
' names using the XPath queries for the corresponding nodes or attributes.
' I'm not sure how this works out...
oInput.fNames = "XPath"
' SQL statement takes results and stores it into lp.htm (the INTO part does that)
' Check out: http://www.markcarter.me.uk/computin...elect_into.htm
cSQL = "SELECT /rss/channel/item/title AS XX,/rss/channel/item/pubDate AS YY," & _
"/rss/channel/item/description AS ZZ INTO '" & f & "' FROM " & cURL

oLog.ExecuteBatch cSQL, oInput, oOutput
Set oInput = Nothing
Set oOutput = Nothing
Set oLog = Nothing

' Open Default web browser to htm file
ShellExecute Application.hwnd, "open", f, vbNullString, vbNullString, SW_NORMAL
End Sub[/vba]
Stan,
This is some pretty cool code, btw. I remember you showing me this in another thread (I still don't understand the problem you were having with the app not working correctly, sorry buddy). I'm starting to understand this better than last time because I am a little better with my SQL knowledge than when I first looked at it.

I'm not sure what fMode = "Tree" is doing exactly. I tried changing it to "Compact" just to see what happens and I received an error. Stan, could you explain what that "Tree" field mode is used for in this code? I read the help documentation...but I'm not sure how it relates to the code.