Hello all - I'm working on an research project where we want to analyze the sentiment of a large number of small blocks of text. And, yes, I'm all too familiar with the pitfalls of automated sentiment analysis. Setting that aside, I'd like to test out the effectiveness of different APIs on sample text before committing to a specific service. I'm running Excel 2010/XP. Here's the code (I've simplified for the sake of this example):
After executing, I receive the following error on the "XML.send" line:
Run-time error '-2147467259 (80004005)':
Unspecified error
Any ideas on how to rectify?
Thank you!
Code:
Sub SentimentTest()
Dim XML
Dim confirmationStatus As Boolean
Set XML = CreateObject("MSXML2.XMLHTTP")
'Confirm Dialogue
confirmationStatus = MsgBox("Continue?", vbYesNo, "Continue?")
If confirmationStatus = 7 Then
Exit Sub
End If
'Turn off Screen Updates
Application.ScreenUpdating = False
XML.Open "POST", "http://www.viralheat.com/api/sentiment/review.xml?text=i%20dont%20like%20this&api_key=DE0FWC1l3wzcJCDdKL", False
'XML.setRequestHeader "Content-Type", "content=text/html; charset=iso-8859-1"
XML.send
MsgBox XML.responseText
End Sub
After executing, I receive the following error on the "XML.send" line:
Run-time error '-2147467259 (80004005)':
Unspecified error
Any ideas on how to rectify?
Thank you!