<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Getting underlined words between two strings in Word in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101207#M48231</link>
    <description>&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/833"&gt;@ewilson&lt;/a&gt; For my start and end text section inputs, I have them entered as all lowercase as well. I tried changing them to title case (as they are in the document) and removing the ',ToLower' from the code but nothing changed - still getting "Overview" and "Example 1" as my only output. Perhaps it's some weird formatting with the "Overview" line of the document but I'm not too sure. &lt;BR /&gt;&lt;BR /&gt;For BP, using version 7.1.0&lt;BR /&gt;For Word, using Office Professional Plus 2010&lt;BR /&gt;&lt;BR /&gt;I'm limited to using 2010 office while I am developing this solution in the dev environment, but once development is complete, I believe the solution will be moved to a different server that has a much newer version of office if that makes any difference.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you.</description>
    <pubDate>Fri, 05 Aug 2022 00:39:59 GMT</pubDate>
    <dc:creator>SeanScud</dc:creator>
    <dc:date>2022-08-05T00:39:59Z</dc:date>
    <item>
      <title>Getting underlined words between two strings in Word</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101201#M48225</link>
      <description>Hello, I am trying to select the underlined words between two sections of a word document and save them to a collection variable.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have the following code, which is working, but it seems to be selecting all underlined words in the document (and also is selecting some blank lines), instead of only selecting the underlined words between the two specific sections in the document. &lt;BR /&gt;&lt;BR /&gt;Document looks like this:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36650.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36661iA70A4EFEA44FF35F/image-size/large?v=v2&amp;amp;px=999" role="button" title="36650.png" alt="36650.png" /&gt;&lt;/span&gt;&lt;BR /&gt;I would want to select "Example1" and "Example3" in the document and save them to a variable, since those are between the two sections and underlined. The two section names will always be the same. &lt;BR /&gt;&lt;BR /&gt;Here's the code I currently have:&lt;BR /&gt;&lt;CODE&gt;Dim doc As Object = GetDocument(handle,documentname)&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;Dim w As Object = doc.Application&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;Dim s As Object = w.Selection&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;Dim Para as Microsoft.Office.Interop.Word.Paragraph&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;Dim blnStart as Boolean &lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;blnStart = false&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;Dim table As New System.Data.DataTable()&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;table.Columns.Add("Underlined_Text", GetType(String))&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;For Each Para In doc.Paragraphs&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;If Para.Range.Text.ToLower.Contains(strStartText) Then&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;blnStart = true&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;End If&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;If Para.Range.Font.Underline = 1 and blnStart Then&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;With s.Range&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;With .Find&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;.ClearFormatting&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;.Replacement.ClearFormatting&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;.Font.Underline = 1&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;.Text = ""&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;.Replacement.Text = ""&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;.Format = True&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;.Forward = True&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;.Wrap = 0&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;.Execute&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;End With&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;.Select&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;table.Rows.Add(s.Range.Text)&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;End With&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;End If&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;If Para.Range.Text.ToLower.Contains(strEndText) Then&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;exit for &lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;End If&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;Next Para&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;Underlined_Text = table&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;doc = Nothing&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;The variables 'strStartText' and 'strEndText' would be equal to the two section names. &lt;BR /&gt;&lt;BR /&gt;Thank you!</description>
      <pubDate>Wed, 03 Aug 2022 23:54:56 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101201#M48225</guid>
      <dc:creator>SeanScud</dc:creator>
      <dc:date>2022-08-03T23:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Getting underlined words between two strings in Word</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101202#M48226</link>
      <description>Hi &lt;A class="user-content-mention" data-sign="@" data-contactkey="f3a22847-3f55-4cfa-8f85-d8c631c63c49" data-tag-text="@Sean Scudellari" href="https://community.blueprism.com/network/profile?UserKey=f3a22847-3f55-4cfa-8f85-d8c631c63c49" data-itemmentionkey="9ab25d89-a704-4dde-9467-55546a3536d8"&gt;@Sean Scudellari&lt;/A&gt;,&lt;BR /&gt;&lt;BR /&gt;I tested the code above, but it would not return anything for me. What I did was change the following check:&lt;BR /&gt;​&lt;BR /&gt;
&lt;PRE class="language-vb"&gt;&lt;CODE&gt;If Para.Range.Font.Underline = 1 and blnStart Then
	With s.Range
		With .Find
			.ClearFormatting
			.Replacement.ClearFormatting
			.Font.Underline = 1
			.Text = ""
			.Replacement.Text = ""
			.Format = True
			.Forward = True
			.Wrap = 0
			.Execute
		End With
		.Select
		table.Rows.Add(s.Range.Text)
	End With
End If
​&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;to this:&lt;/P&gt;
&lt;PRE class="language-vb"&gt;&lt;CODE&gt;If Para.Range.Words(1).Font.Underline = 1 and blnStart Then
	With s.Range
		With .Find
			.ClearFormatting
			.Replacement.ClearFormatting
			.Font.Underline = 1
			.Text = ""
			.Replacement.Text = ""
			.Format = True
			.Forward = True
			.Wrap = 0
			.Execute
		End With
		.Select
		table.Rows.Add(s.Range.Text)
	End With
End If
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Notice in the &lt;STRONG&gt;If...Then&lt;/STRONG&gt; that I'm specifically checking the underline format of the first word in the paragraph.&amp;nbsp;&lt;/P&gt;
Cheers,&lt;BR /&gt;Eric</description>
      <pubDate>Thu, 04 Aug 2022 12:04:34 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101202#M48226</guid>
      <dc:creator>ewilson</dc:creator>
      <dc:date>2022-08-04T12:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Getting underlined words between two strings in Word</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101203#M48227</link>
      <description>&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/833"&gt;@ewilson&lt;/a&gt; Thank you, Eric. I was able to get this working using your '.Words(1)' suggestion. However, my code was still selecting all underlined words in the document and not just the underlined words between the specified sections. &lt;BR /&gt;&lt;BR /&gt;So I modified my code to the following using your '.Words(1)' suggestion:&lt;BR /&gt;
&lt;PRE class="language-vbnet"&gt;&lt;CODE&gt;Dim doc as Object = GetDocument(handle,documentname)

Dim Para as Microsoft.Office.Interop.Word.Paragraph

Dim table As New System.Data.DataTable()
table.Columns.Add("Underlined_Text", GetType(String))

Dim blnStart as Boolean 
blnStart = false

For Each Para In doc.Paragraphs

  If Para.Range.Text.ToLower.Contains(strStartText) Then
    blnStart = true
  End If

  If Para.Range.Words(1).Font.Underline = 1 and blnStart Then
	table.Rows.Add(Para.Range.Text)
  End If

  If Para.Range.Text.ToLower.Contains(strEndText) Then
    exit for 
  End If

Next Para

Underlined_Text = table​&lt;/CODE&gt;&lt;/PRE&gt;
​&lt;BR /&gt;The only thing I am curious of now is if it's possible to only select the underlined portion of the word instead of selecting the whole paragraph if the first word is underlined. Do you know if this is possible? I was trying to play around with the code but couldn't figure it out.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks again!</description>
      <pubDate>Thu, 04 Aug 2022 21:16:18 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101203#M48227</guid>
      <dc:creator>SeanScud</dc:creator>
      <dc:date>2022-08-04T21:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Getting underlined words between two strings in Word</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101204#M48228</link>
      <description>Hi &lt;A class="user-content-mention" data-sign="@" data-contactkey="f3a22847-3f55-4cfa-8f85-d8c631c63c49" data-tag-text="@Sean Scudellari" href="https://community.blueprism.com/network/profile?UserKey=f3a22847-3f55-4cfa-8f85-d8c631c63c49" data-itemmentionkey="6a8706e0-0d5d-4e44-b5c8-98340ead6e5f"&gt;@Sean Scudellari&lt;/A&gt;,&lt;BR /&gt;&lt;BR /&gt;Below is the code as I have it set up. &lt;BR /&gt;&lt;BR /&gt;
&lt;PRE class="language-vbnet"&gt;&lt;CODE&gt;' Declare object for code use
Dim doc as Object = GetDocument(handle,document_name)

Dim w As Object = doc.Application
Dim s As Object = w.Selection

Dim Para as Object

Dim blnStart as Boolean
blnStart = false

Dim table As New System.Data.DataTable()
table.Columns.Add("Underlined_Text", GetType(String))

For Each Para In doc.Paragraphs
	If Para.Range.Text.ToLower.Contains(startText) Then
		blnStart = true
	End If

	If Para.Range.Words(1).Font.Underline = 1 and blnStart Then
		With s.Range
			With .Find
				.ClearFormatting
				.Replacement.ClearFormatting
				.Font.Underline = 1
				.Text = ""
				.Replacement.Text = ""
				.Format = True
				.Forward = True
				.Wrap = 0
				.Execute
			End With
			.Select
			table.Rows.Add(s.Range.Text)
		End With
	End If

	If Para.Range.Text.ToLower.Contains(endText) Then
		Exit For
	End If

Next Para

Underlined_Text = table
doc = Nothing
​&lt;/CODE&gt;&lt;/PRE&gt;
​&lt;BR /&gt;And here's a screenshot of the Word doc I'm using based on your example:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36648.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36657iAB74CFCA30A7874A/image-size/large?v=v2&amp;amp;px=999" role="button" title="36648.png" alt="36648.png" /&gt;&lt;/span&gt;&lt;BR /&gt;In my tests, the only words that are captured and returned in the output &lt;STRONG&gt;Underlined Words&lt;/STRONG&gt; Collection are &lt;EM&gt;&lt;STRONG&gt;Example1&lt;/STRONG&gt;&lt;/EM&gt; and &lt;EM&gt;&lt;STRONG&gt;Example3&lt;/STRONG&gt;&lt;/EM&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36649.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36659iF968A09C569CF95A/image-size/large?v=v2&amp;amp;px=999" role="button" title="36649.png" alt="36649.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Eric</description>
      <pubDate>Thu, 04 Aug 2022 21:36:10 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101204#M48228</guid>
      <dc:creator>ewilson</dc:creator>
      <dc:date>2022-08-04T21:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Getting underlined words between two strings in Word</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101205#M48229</link>
      <description>&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/833"&gt;@ewilson&lt;/a&gt; Thank you for the detailed help Eric. &lt;BR /&gt;&lt;BR /&gt;I copied and pasted your code directly and for some reason, an underlined word above the two sections is getting selected and saved to the variable and only one underlined word between section 1 and section 2 is getting selected.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For example my document looks like this:&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;SPAN style="text-decoration: underline;"&gt;Overview&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;some text&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;some text&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;some text&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;Section 1&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;SPAN style="text-decoration: underline;"&gt;Example 1:&lt;/SPAN&gt; some text&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Example 2: some text&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;SPAN style="text-decoration: underline;"&gt;Example 3&lt;/SPAN&gt;: some text&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;Section 2&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;SPAN style="text-decoration: underline;"&gt;Some text&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/EM&gt;For some reason, "overview" is getting selected. And then only "Example1" gets selected but not "Example3". It's pretty strange.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;However, if I delete the "overview" text from the document, then only "Example1" and "Example3" get selected, which is what I want since those are the two underlined items between section 1 and section 2. I verified my start and end text variables are set to Section 1 and Section 2 as well.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Not too sure what's going on... Thanks again for your help.</description>
      <pubDate>Thu, 04 Aug 2022 22:29:21 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101205#M48229</guid>
      <dc:creator>SeanScud</dc:creator>
      <dc:date>2022-08-04T22:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Getting underlined words between two strings in Word</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101206#M48230</link>
      <description>&lt;A class="user-content-mention" data-sign="@" data-contactkey="f3a22847-3f55-4cfa-8f85-d8c631c63c49" data-tag-text="@Sean Scudellari" href="https://community.blueprism.com/network/profile?UserKey=f3a22847-3f55-4cfa-8f85-d8c631c63c49" data-itemmentionkey="9a976a9b-3663-4de7-b2f8-22eac5cb72f1"&gt;@Sean Scudellari&lt;/A&gt;,&lt;BR /&gt;&lt;BR /&gt;One thing I noticed in your original code is that you’re performing a ToLower() call when checking for the start and end sections. Because of that, I passed in the values of start and end as lower case too (i.e.​ “section 1” and “section 2”).&lt;BR /&gt;&lt;BR /&gt;What version of Blue Prism and MS Word are you using?&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Eric</description>
      <pubDate>Thu, 04 Aug 2022 23:08:55 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101206#M48230</guid>
      <dc:creator>ewilson</dc:creator>
      <dc:date>2022-08-04T23:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Getting underlined words between two strings in Word</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101207#M48231</link>
      <description>&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/833"&gt;@ewilson&lt;/a&gt; For my start and end text section inputs, I have them entered as all lowercase as well. I tried changing them to title case (as they are in the document) and removing the ',ToLower' from the code but nothing changed - still getting "Overview" and "Example 1" as my only output. Perhaps it's some weird formatting with the "Overview" line of the document but I'm not too sure. &lt;BR /&gt;&lt;BR /&gt;For BP, using version 7.1.0&lt;BR /&gt;For Word, using Office Professional Plus 2010&lt;BR /&gt;&lt;BR /&gt;I'm limited to using 2010 office while I am developing this solution in the dev environment, but once development is complete, I believe the solution will be moved to a different server that has a much newer version of office if that makes any difference.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you.</description>
      <pubDate>Fri, 05 Aug 2022 00:39:59 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101207#M48231</guid>
      <dc:creator>SeanScud</dc:creator>
      <dc:date>2022-08-05T00:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Getting underlined words between two strings in Word</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101208#M48232</link>
      <description>&lt;A class="user-content-mention" data-sign="@" data-contactkey="f3a22847-3f55-4cfa-8f85-d8c631c63c49" data-tag-text="@Sean Scudellari" href="https://community.blueprism.com/network/profile?UserKey=f3a22847-3f55-4cfa-8f85-d8c631c63c49" data-itemmentionkey="c21e6771-b974-40d0-bafe-e3a329a38cdb"&gt;@Sean Scudellari&lt;/A&gt;,&lt;BR /&gt;&lt;BR /&gt;I’m also using BP v7.1​, but I’m using the latest Microsoft 365 version of Word. So this could be related to a difference in our versions of Word, or it could be the test document. In my document, both &lt;B&gt;Section 1 &lt;/B&gt;and &lt;B&gt;Section 2&lt;/B&gt; are styled using the default &lt;B&gt;Header 1&amp;nbsp;&lt;/B&gt;style.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Eric</description>
      <pubDate>Fri, 05 Aug 2022 12:38:12 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101208#M48232</guid>
      <dc:creator>ewilson</dc:creator>
      <dc:date>2022-08-05T12:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Getting underlined words between two strings in Word</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101209#M48233</link>
      <description>&lt;A class="user-content-mention" data-sign="@" data-contactkey="f3a22847-3f55-4cfa-8f85-d8c631c63c49" data-tag-text="@Sean Scudellari" href="https://community.blueprism.com/network/profile?UserKey=f3a22847-3f55-4cfa-8f85-d8c631c63c49" data-itemmentionkey="0f4387e4-6e8b-4f37-b78b-e59622ac57e8"&gt;@Sean Scudellari&lt;/A&gt;,&lt;BR /&gt;&lt;BR /&gt;I've attached the file I used for testing if you want to give it a try to see if you have a different result.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Eric​</description>
      <pubDate>Fri, 05 Aug 2022 15:07:56 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101209#M48233</guid>
      <dc:creator>ewilson</dc:creator>
      <dc:date>2022-08-05T15:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Getting underlined words between two strings in Word</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101210#M48234</link>
      <description>&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/833"&gt;@ewilson&lt;/a&gt; Thank you for providing that, Eric. I got the correct results using your file. I think one issue may be that there is a section called "overview" which is just above my section 1, and section 1 has "overview" in its name as well. However, even if I remove the top "overview" section, the code still fails to get the last underlined word just before section 2. The sections in my document are also not formatted as headers. So it could be a combination of not using formatted headers and the different versions of office.&lt;BR /&gt;&lt;BR /&gt;Luckily, the code where I use this works as expected:
&lt;PRE class="language-vbnet" tabindex="0"&gt;&lt;CODE&gt; If Para.Range.Words(1).Font.Underline = 1 and blnStart Then
	table.Rows.Add(Para.Range.Text)
  End If​&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BR /&gt;So I should be able to use that and then just split the string on the ':' so that I only keep the underlined portion. Will test out the other method once I am using the newer version of office to see if there's any difference.&lt;BR /&gt;&lt;BR /&gt;I appreciate the help and quick replies Eric! Definitely could not have made it to this point without your support.&lt;BR /&gt;&lt;BR /&gt;​</description>
      <pubDate>Fri, 05 Aug 2022 16:45:57 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Getting-underlined-words-between-two-strings-in-Word/m-p/101210#M48234</guid>
      <dc:creator>SeanScud</dc:creator>
      <dc:date>2022-08-05T16:45:57Z</dc:date>
    </item>
  </channel>
</rss>

