<?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: How to write a collection in MS WORD VBO in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/How-to-write-a-collection-in-MS-WORD-VBO/m-p/52553#M7408</link>
    <description>&lt;P&gt;Were you able to resolve this?&lt;/P&gt;
&lt;P&gt;I am getting the following errors:&lt;BR /&gt;1. "GetDocument" is not declared&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Because of this error in code stage I am not able to run my process.&lt;BR /&gt;Any help would be greatly appreciated&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Aysha M&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Fri, 07 Aug 2020 15:58:00 GMT</pubDate>
    <dc:creator>AyshaM</dc:creator>
    <dc:date>2020-08-07T15:58:00Z</dc:date>
    <item>
      <title>How to write a collection in MS WORD VBO</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-to-write-a-collection-in-MS-WORD-VBO/m-p/52547#M7402</link>
      <description>&lt;SPAN&gt;Hello, I've got one problem. I need to write my collection which contains 50 rows into my MS Word file.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I do it? I've checked that there is an action named Type Text, but it is only for text type, not for a collection.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you please give me some advice ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Patryk Liberski&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Jul 2019 13:48:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-to-write-a-collection-in-MS-WORD-VBO/m-p/52547#M7402</guid>
      <dc:creator>PatrykLiberski</dc:creator>
      <dc:date>2019-07-05T13:48:00Z</dc:date>
    </item>
    <item>
      <title>RE: How to write a collection in MS WORD VBO</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-to-write-a-collection-in-MS-WORD-VBO/m-p/52548#M7403</link>
      <description>You'll probably need some custom code to programmatically create a table and then set the cell values of the table by looping through the rows/columns of your collection in BP.&lt;BR /&gt;&lt;BR /&gt;I imagine you could also use hotkeys (or maybe ALT+N+T+I and then spy the popup window to configure the table size) to create the table. The easiest way is if the table already exists. The MS Word VBO has an action for 'Add Table Row'. So you'd just need to be sure it already has enough columns. With this, you'd loop through your collection in Blue Prism, assigning the table cell values as you go.&lt;BR /&gt;&lt;BR /&gt;I don't already have custom code for this, so maybe someone else will respond with a code solution for this. In the meantime, I'm guessing you'd do something like this:&lt;BR /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;A href="https://docs.microsoft.com/en-us/visualstudio/vsto/how-to-programmatically-create-word-tables?view=vs-2019" target="test_blank"&gt;https://docs.microsoft.com/en-us/visualstudio/vsto/how-to-programmatically-create-word-tables?view=vs-2019&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Dave Morris&lt;BR /&gt;3Ci @ Southern Company&lt;BR /&gt;Atlanta, GA&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Jul 2019 13:59:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-to-write-a-collection-in-MS-WORD-VBO/m-p/52548#M7403</guid>
      <dc:creator>david.l.morris</dc:creator>
      <dc:date>2019-07-05T13:59:00Z</dc:date>
    </item>
    <item>
      <title>RE: How to write a collection in MS WORD VBO</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-to-write-a-collection-in-MS-WORD-VBO/m-p/52549#M7404</link>
      <description>If your collection is not much complicated and you just need to write it in word document, you can try - Utility - JSON object, it will convert the collection to a text string, you can apply some string operations to the text string to get it in your desired format.&lt;BR /&gt;&lt;BR /&gt;Like replacing ":'" by space, and removing { and }, not sure what would be other challenges but this seems to be simple approach.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Ishan Mahajan &lt;BR /&gt;India&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Jul 2019 14:43:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-to-write-a-collection-in-MS-WORD-VBO/m-p/52549#M7404</guid>
      <dc:creator>IshanMahajan</dc:creator>
      <dc:date>2019-07-05T14:43:00Z</dc:date>
    </item>
    <item>
      <title>RE: How to write a collection in MS WORD VBO</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-to-write-a-collection-in-MS-WORD-VBO/m-p/52550#M7405</link>
      <description>&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/33399"&gt;@PatrykLiberski&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;Ishan makes a good point. You could use a quick convert action to put the data into Word. I could have sworn I saw in your post that you wanted it in a Word Table. If you don't need it in a table, try the JSON object as Ishan mentions. You could also try the Utility - Strings action 'Get Collection as CSV' and do similar string manipulation to change the field delimeter and such. I think it's gonna depend on what the purpose is of putting the data into Word that will affect how you need to format it.&lt;BR /&gt;&lt;BR /&gt;Edit: As far as getting the collection into Word after converting from collection to CSV or to JSON, you can use the resulting text data item as input to the 'Utility - Environment' VBO's action 'Set Clipboard' to get the data into the clipboard. Then You can use the MS Word VBO's action 'Paste from Clipboard'.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Dave Morris&lt;BR /&gt;3Ci @ Southern Company&lt;BR /&gt;Atlanta, GA&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Jul 2019 14:48:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-to-write-a-collection-in-MS-WORD-VBO/m-p/52550#M7405</guid>
      <dc:creator>david.l.morris</dc:creator>
      <dc:date>2019-07-05T14:48:00Z</dc:date>
    </item>
    <item>
      <title>RE: How to write a collection in MS WORD VBO</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-to-write-a-collection-in-MS-WORD-VBO/m-p/52551#M7406</link>
      <description>You can write collection to excel and copy paste it to Word as well or you can try this custom code&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE class="language-csharp"&gt;Dim doc &lt;SPAN class="token keyword"&gt;as&lt;/SPAN&gt; Object &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;GetDocument&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;handle&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;documentname&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
Dim word As Object &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; doc&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Application
Dim s As Object &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; word&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Selection&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Range
Dim tblNew As Object 
Dim celly&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;cellx As Integer 
cellx&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;
celly&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;

If headers Then
	tblNew &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; doc&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Tables&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;s&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;dt&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Rows&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Count&lt;SPAN class="token operator"&gt;+&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;dt&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Columns&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Count&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
	Else
	tblNew &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; doc&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Tables&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;s&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;dt&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Rows&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Count&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;dt&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Columns&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Count&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
End If

If headers Then
	For Each col As System&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Data&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;DataColumn In dt&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Columns
		tblNew&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Cell&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;cellx&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;celly&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Range&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Text &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; col&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;ColumnName
		celly &lt;SPAN class="token operator"&gt;+&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;
	Next
	cellx &lt;SPAN class="token operator"&gt;+&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;
End If

For Each row As System&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Data&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;DataRow In dt&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Rows
	celly &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;
	For Each col As System&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Data&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;DataColumn In dt&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Columns
		tblNew&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Cell&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;cellx&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;celly&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Range&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Text &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;row&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;col&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
		celly &lt;SPAN class="token operator"&gt;+&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;
	Next
	cellx &lt;SPAN class="token operator"&gt;+&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;
Next
​&lt;/PRE&gt;
handle, documentname, dt (collection) &amp;amp; headers(flag) are inputs&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Gopal Bhaire&lt;BR /&gt;Analyst&lt;BR /&gt;Accenture&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Sat, 06 Jul 2019 08:54:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-to-write-a-collection-in-MS-WORD-VBO/m-p/52551#M7406</guid>
      <dc:creator>GopalBhaire</dc:creator>
      <dc:date>2019-07-06T08:54:00Z</dc:date>
    </item>
    <item>
      <title>RE: How to write a collection in MS WORD VBO</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-to-write-a-collection-in-MS-WORD-VBO/m-p/52552#M7407</link>
      <description>Hi Gopal,&lt;BR /&gt;&lt;BR /&gt;Thanks for sharing the code. I have crated code stage as you suggested, but I am getting following error. Can you please let me know if I need to select any namespace or dll to make this code works? There is no error at code run stage, but I am getting following error related "Object variable or With block variable not set."&lt;BR /&gt;&lt;BR /&gt;It would be great if you can help me with this error.&lt;BR /&gt;&lt;BR /&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="30106.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/30234iAC5898D3B41A6778/image-size/large?v=v2&amp;amp;px=999" role="button" title="30106.png" alt="30106.png" /&gt;&lt;/span&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="30107.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/30236iD2C85CADAA2C1163/image-size/large?v=v2&amp;amp;px=999" role="button" title="30107.png" alt="30107.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="30108.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/30238iCCBC3B5AAAC3BED7/image-size/large?v=v2&amp;amp;px=999" role="button" title="30108.png" alt="30108.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Harshadkumar Patel&lt;BR /&gt;Senior Automation Associate&lt;BR /&gt;S&amp;amp;P Global Market Intelligence&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Nov 2019 13:57:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-to-write-a-collection-in-MS-WORD-VBO/m-p/52552#M7407</guid>
      <dc:creator>HarshadkumarPat</dc:creator>
      <dc:date>2019-11-13T13:57:00Z</dc:date>
    </item>
    <item>
      <title>RE: How to write a collection in MS WORD VBO</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-to-write-a-collection-in-MS-WORD-VBO/m-p/52553#M7408</link>
      <description>&lt;P&gt;Were you able to resolve this?&lt;/P&gt;
&lt;P&gt;I am getting the following errors:&lt;BR /&gt;1. "GetDocument" is not declared&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Because of this error in code stage I am not able to run my process.&lt;BR /&gt;Any help would be greatly appreciated&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Aysha M&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Aug 2020 15:58:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-to-write-a-collection-in-MS-WORD-VBO/m-p/52553#M7408</guid>
      <dc:creator>AyshaM</dc:creator>
      <dc:date>2020-08-07T15:58:00Z</dc:date>
    </item>
  </channel>
</rss>

