Grant60601

I am building a table and am getting data for the table from sqlserver. The columns that are being returned need to be wrapped into a second row. I was thinking of the folloing logic.

Create table 1, loop through data, create table with 2 rows, fill table 2 with data for the record, next.

Is this the best approach or is their a method that would wrap the columns into the next column with out needint a table in a table.

In either case can you point out an example of how to do this.

Also a side note, when I search MSDN and get results like this they are in french, itialian, espanol, why will it not stay on US-EN My profile says USA.




Re: Visual Studio Tools for Office vsto vb.net need table in table or wrap rows?

Cindy Meister

Grant60601 wrote:

I am building a table and am getting data for the table from sqlserver. The columns that are being returned need to be wrapped into a second row. I was thinking of the folloing logic.

Create table 1, loop through data, create table with 2 rows, fill table 2 with data for the record, next.

Is this the best approach or is their a method that would wrap the columns into the next column with out needint a table in a table.

In either case can you point out an example of how to do this.

I'm not sure I understand what you mean by "the columns need to be wrapped to a second row". Must have a fuzzy brain this morning... Could you provide an example

Is this a situation where you have too many columns to fit on the page Or are we dealing with a one-to-many situation Or is it something else

Which version of Word are we discussing Is this a VSTO document or VSTO add-in And if you want a code sample, which programming language are you using

Grant60601 wrote:
Also a side note, when I search MSDN and get results like this they are in french, itialian, espanol, why will it not stay on US-EN My profile says USA.

I get taken to German-language interfaces all the time. People program these sites to pick up the most obscure settings in Windows to decide which language interface to use - it's really annoying. If you look up at the top right of the link you give me, you should see the language in bold type (just to the left of Microsoft.com). Click that to drop down a list and choose the United States link. That should keep things stable at least during the current session. You can try the "Contact Us" link on MSDN. Or you might try a newsgroup for the browser you're working with. Someone their might know which setting MSDN is looking at these days for making this decision.






Re: Visual Studio Tools for Office vsto vb.net need table in table or wrap rows?

Grant60601

Thank you for responding Cindy. The problem is after I correct the language the page always gets reset to the msdn portal and I lose my page. Very frustrating. IE7 Sad

VSTO word Doc project, vb.net, I did mention this in the header so I dont feel to silly.

Yes lets say that 3 table columns take up the entire width of the page (or in word a newspaper column), their is a fourth column of data, I would like to drop down to the next row and have that 4th column be there. I might have been making it to complicated. Now I am thinking Ill add an extra row with only 1 column but have not gotten that to work yet. Any tips would be appreciated.






Re: Visual Studio Tools for Office vsto vb.net need table in table or wrap rows?

Cindy Meister

Sorry about missing the info in the subject line. When I read through something a number of times, trying to understand, what's peripheral to the message text sometimes gets lost during the processing. Buggy wetware :-)

Yes, I was wondering whether the idea you bring up might work. Simplest would be to create that second row with all the columns, then just remove the borders so that it visually looks like a single row.

Another possibility would be to merge all the cells across that row, effectively creating a one-cell row.

The only thing you need to take into consideration is that as soon as you merge cells you'll no longer be able to work directly with columns. Word will tell you "I can't do that" because the number of columns won't match across all the rows. And if you happen to use field codes for calculations (I doubt it, but for the sake of completeness...), they probably won't work correctly under these circumstances.

Since you're using VB.NET, the quickest way for you to find out what objects, properties and methods are required is to record a macro while removing borders or merging cells in the Word UI :-)