title: Get Element By ? tag name id or class name How do you get the innertext of below
body: <p>The UPS Website changed.  Instead of the tag  it change to </p>
  
  <pre><code>Private Function TrackUPS(trackingNumber As String) As String
      Dim xml As Object
      Dim tempString As String
      Dim htmlDoc As Object  ' MSHTML.HTMLDocument
      Dim htmlBody As Object  ' MSHTML.htmlBody
      Dim anchors As Object  ' MSHTML.IHTMLElementCollection
      Dim anchor As Object  ' MSHTML.IHTMLElement
      Dim dds As Object  ' MSHTML.IHTMLElementCollection
      Dim ddr As Object
      Dim dt As Object
      Dim dd As Object  ' MSHTML.IHTMLElement
  
      'tempString = GetMSXMLWebResponse(UPSUrl &amp; trackingNumber)
  
      Set xml = GetMSXML
      If xml Is Nothing Then  ' cannot start MSXML 6.0
          TrackUPS = MSXML_ERROR
          Exit Function
      End If
  
      tempString = GetResponse(xml, HTTP_GET, UPSUrl &amp; trackingNumber, False)
  
      If Len(tempString) = 0 Then
          TrackUPS = ERROR_MSG
          Exit Function
      End If
  
      Set htmlDoc = CreateHTMLDoc
      If htmlDoc Is Nothing Then  ' cannot reference MSHTML object library
          TrackUPS = MSHTML_ERROR
          Exit Function
      End If
  
      Set htmlBody = htmlDoc.body
      htmlBody.innerHTML = tempString
      On Error Resume Next
      Set dds = htmlDoc.getElementsByclassname("").innerText
      'Set dds = htmlDoc.getElementsByTagName("dd")
      Set ddr = htmlDoc.getElementsByTagName("dt")
      Strg1 = htmlDoc.getElementById("tt_spStatus").innerText
      Strg2 = dds.Item(1).innerText
      Strg3 = dds.Item(11).innerText
      Strg4 = htmlDoc.getElementById("tt_pgfStatus").innerText
      Strg5 = htmlDoc.getElementById("tt_ovntStatus").innerText
      If Len(Strg1) = 0 Then
          Strg1 = Strg4
          If Len(Strg4) = 0 Then
              Strg1 = Strg5
          End If
      End If
      PODEnd10 = Strg1 &amp; "|" &amp; Strg2
      If PODEnd10 = "|1.   " Then GoTo Line1 Else GoTo Line2
      Line2:
      If PODEnd10 = "|&gt;&gt;&gt;1." Then GoTo Line1 Else GoTo Line3
      Line3:
      TrackUPS = Strg1 &amp; "|" &amp; Strg2
      Exit Function
      Line1:
      TrackUPS = "NO|POD|INFO"
      Exit Function
  End Function
  </code></pre>
  
  <p>So the website shows the Day and Time with this:</p>
  
  <pre><code>&lt;p class=""&gt;
      Monday, &amp;nbsp;01/11/2016
      at&amp;nbsp;9:09 A.M.
  &lt;/p&gt;
  </code></pre>
  
  <p>I use this in the above code:
      Set dds = htmlDoc.getElementsByclassname("").innerText
  However the <code>&lt;p class=""&gt;</code> has no name.  How do I capture the innertext of that element?
  Any help would be greatly appreciated.  I rely on this daily.</p>
  
  <p>Here is the entire div class:</p>
  
  <pre><code>&lt;div class="ups-group ups-group_condensed"&gt;
  p class="ups-form_label"&gt;&lt;strong&gt;Delivered On:&lt;/strong&gt;&lt;/p&gt;
  
  &lt;p class=""&gt;
      Monday, &amp;nbsp;01/11/2016
      at&amp;nbsp;9:09 A.M.
  &lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>What would be the .innertext coding in vba to return the Monday and the date and time of the P class""?</p>