I am trying to create a word 2010 template to display some data to user when he creates a new document based on it. As such, I need to display a table in the document.
I have created the document template, and it uses string with tab separators. Problem is, to use these separators, I need to convert the table to text. And every time I select the "convert to text", table loses all shading and border selections.
I want to keep that alternate row shading in the table, and use a simple grid to segregate the cells. I have no idea what I am doing wrong, because somehow word is not even accepting different border styles. How do I resolve this problem?
Edit: Another try at explaining the problem
I am receiving some data in a vbString format, with tab characters to separate blocks. Say "Hello\tWorld\tFromVB" where \t denotes the start of new block of text. I want to transfer this data to Word template's table.
Right now, table contains just the header row. So, if I convert the table to text, and then transfer the vbString to the very end of table header, it creates new rows on the fly. Just like in normal word document, \t or tab creates a new cell or row. So, if I convert my table to text, vbString will add data to different cells automatically.
This works well, and saves on manually adding new rows and then accessing each cell separately. But, for it to work, we need to convert the table to text. Without that, it will add all the data in single cell.
Now, the problem is that "convert to text" doesn't work as expected. Normally, when I use "Convert to Text", it keeps the border and shading information. Right now, it is completely forgetting all shading information. So, if I shade the header row grey, and then convert to text, shading is gone.
I hope that explains it better. Although I understand if it is still confusing. As for screenshots, I can't provide those, being a confidential information and all that. I can however add code snippets as needed.