title: Getting Visual Basic Program to Type into an HTML <p> and <input> tag with no id/name
body: <p>So I have a program that takes a few inputs from textboxes and then adds them all up into two strings. Basically here is the problem, I am trying to get one of the strings to go into the forum post "title" and one into the forum "body". (This is not a spam program, it makes it easier for people to post ban reports for players on our server.) Here is the HTML codes for the website I am trying to type into;     </p>
  
  <hr>
  
  <p><code>&lt;p class="ipsField_content"&gt;
  &lt;input id="topic_title" class="input_text" type="text" size="60" maxlength="150" name="TopicTitle" value="" tabindex="2"&gt;
  &lt;/p&gt;</code></p>
  
  <hr>
  
  <p>The HTML code above is for the topic title area I want to type into. The problem with this is that it always says how it can not find this area.</p>
  
  <hr>
  
  <p>'This is the HTML code for the forum body:</p>
  
  <pre><code>&lt;body spellcheck="true" class="cke_show_borders"&gt;
  &lt;p&gt;This is where I want to be able to type&lt;/p&gt;
  &lt;/body&gt;`
  </code></pre>
  
  <hr>
  
  <p>With the HTML code above, I can't seem to get this VB code below to select that text area and enter in my string.</p>
  
  <hr>
  
  <p><code>WebBrowser1.Document.GetElementsByTagName("p").InnerText = post</code></p>
  
  <hr>
  
  <p>One reason is because VB doesn't allow me to use .innertext on a tag, and the other is that I do not know how to really specify which "p" tag. Like there is multiple "p" tags on this webpage, but it is the only "p" inside the "body" tag, if I could specify that somehow.</p>
  
  <p>Here is the VB code I am using currently for the program.</p>
  
  <hr>
  
  <p><code>Dim Report As String
  Report = YourName &amp; Suspect2 &amp; Server &amp; Time2 &amp; Reason &amp; RulesBroken &amp; Proof</code></p>
  
  <pre><code>    Dim topictitle As String
      topictitle = ("" &amp; Suspect &amp; " - " &amp; txtReason.Text &amp; txtReasonCustom.Text &amp; "")
  
      txtTitle.Text = topictitle
      txtPost.Text = Report`
  </code></pre>
  
  <p><code>making sure that the words "sign out" is on the page to insure the webbrowser is signed in.</code></p>
  
  <pre><code>    `Dim theElementCollection As HtmlElementCollection
      theElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
      For Each curElement As HtmlElement In theElementCollection
          Dim controlName As String = curElement.GetAttribute("name").ToString
          If WebBrowser1.DocumentText.Contains("Sign Out") Then 
      WebBrowser1.Navigate("www.ThisLinksToMakeNewPostOnTheWebsite.com")
      WebBrowser1.Document.GetElementById("topic_title").InnerText = txtTitle.Text
      WebBrowser1.Document.GetElementByTagName("body").firstchild.InnerText = txtPost.Text
          End If`
  </code></pre>
  
  <hr>
  
  <hr>
  
  <p><code>this code below is used to click the submit button</code></p>
  
  <pre><code>   `WebBrowser1.Document.Forms(0).InvokeMember("submit")`
  </code></pre>
  
  <hr>
  
  <hr>
  
  <p><code>also this is the html code for the "Post New Topic" button</code></p>
  
  <pre><code>   &lt;input type="submit" name="dosubmit" value="Post New Topic" tabindex="50" class="input_submit" accesskey="s"&gt;
  </code></pre>
  
  <hr>
  
  <p>Anyways that is it. I tried to include as much information and as much lines of code as I could to show that I really am trying.
  Please help, I have tried the MSDN links, but I can't seem to apply it to this.</p>