How to read HTML in Lotus Notes inbox messages in VBA

5 pts.
Tags:
Access VBA
Domino Notes
HTML for Lotus Notes Domino
MS Access VBA
Can anyone show me how to get html from Notes inbox messages in VBA? I am using Access VBA to send notes email messages.  The message is a form I'm asking the recipient to fill out and return.  The message contains html with <select> and <input> elements.  The replies come back and in Lotus Notes, I am able to read what option the sender selected and any text they may have entered.  In VBA code, I am able to loop thru the inbox messages and get the message, however I am only able to get the plain text.  With plain text, I am able to get the text that was entered into a textbox element but I am not able to get anything from a dropdown select element. Here is some code that is working:
Dim session As Object
Dim mailDb As Object
Dim view As Object
Dim doc As Object

Dim MailServer As String
Dim MailDbPath As String

MailServer = "myMailServer"
MailDbPath = "myDBPath"
Dim i As Integer
Set session = CreateObject("Notes.NotesSession")

Set mailDb = session.GETDATABASE(MailServer, MailDbPath$)
If mailDb.isOpen = False Then mailDb.OPENMAIL
Set view = mailDb.GetView("ReplyFolder")
Set doc = view.GetFirstDocument

Do While Not (doc Is Nothing)
Dim thisSubject As String
Dim thisFrom As String
Dim thisDate As Date
Dim thisbody As String
thisDate = doc.Created
If doc.GetItemValue("Form")(0) = "Reply" Then
thisSubject = doc.GetItemValue("Subject")(0)
If InStr(1, thisSubject, "*** RESPONSE REQUIRED ***") > 0 Then
thisFrom = doc.GetItemValue("From")(0)
thisbody = doc.GetItemValue("Body")(0)'<<<  This is the plain-text body of the message.
'     html tags are stripped out.
'     I get text from <input type='text'> elements
'     I do not get text from <select> elements
End If
End If
Set doc = view.GetNextDocument(doc)
i = i + 1
If i > 1000 Then Exit Do
Loop
ASKED: February 27, 2014  9:59 PM
UPDATED: February 28, 2014  12:55 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following