Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Jenny Beavers
 
Posts: n/a
Default Create multiple stacked tables in word using vb.net

Hello everyone, I am glad I found you!
Here is what I am using:
Word ver 2002
OS XP
VB.Net

In vb.net I need to find a certain location in a Word template, then add
multiple tables fed from a dataset with a line in between each table
containing descriptive text. I have tried creating bookmarks on the fly and
adding a table to each bookmark without much success especially in where and
how they appear.
The tables need to be stacked so to speak on top of one another with a
descriptive line of text in between each table.
One of the main problems I have is in determining how to create the bookmark
locations to be one after the other(possibly with a space in between).
Maybe bookmarks are not the way to go.

Thanks in advance for any response.
  #2   Report Post  
Posted to microsoft.public.word.tables
Cindy M -WordMVP-
 
Posts: n/a
Default Create multiple stacked tables in word using vb.net

Hi ?B?SmVubnkgQmVhdmVycw==?=,

Hello everyone, I am glad I found you!

Well, still not *quite* the right place (an office.developer group would be
better; this group caters to end-users), but definitely a good place to start
:-)

Basically, you have to proceed like this:

1. Find the starting point (for the first table).

Note: you should be working with RANGES, not SELECTION objects.

2. Insert the first table, roughly:

Dim tbl As Word.Table = rng.Tables.Add 'Parameters here
'Populate and format the table

3. Now move the position outside the table, using a range
Dim rngTbl =tbl.Range
rngTbl.Collapse wdCollapseEnd
'This is just below the table
rngTbl.Text = "Text between the tables" & vbCR
rngTbl.Collapse wdCollapseEnd
tbl = Nothing
tbl = rngTbl.Tables.Add 'etc.

Here is what I am using:
Word ver 2002
OS XP
VB.Net

In vb.net I need to find a certain location in a Word template, then add
multiple tables fed from a dataset with a line in between each table
containing descriptive text. I have tried creating bookmarks on the fly and
adding a table to each bookmark without much success especially in where and
how they appear.
The tables need to be stacked so to speak on top of one another with a
descriptive line of text in between each table.
One of the main problems I have is in determining how to create the bookmark
locations to be one after the other(possibly with a space in between).
Maybe bookmarks are not the way to go.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

  #3   Report Post  
Posted to microsoft.public.word.tables
Jenny Beavers
 
Posts: n/a
Default Create multiple stacked tables in word using vb.net

Cindy,
Thank you for your response, your example is very clear and helpful. Also, I
am sorry for posting In the wrong area.

"Cindy M -WordMVP-" wrote:

Hi ?B?SmVubnkgQmVhdmVycw==?=,

Hello everyone, I am glad I found you!

Well, still not *quite* the right place (an office.developer group would be
better; this group caters to end-users), but definitely a good place to start
:-)

Basically, you have to proceed like this:

1. Find the starting point (for the first table).

Note: you should be working with RANGES, not SELECTION objects.

2. Insert the first table, roughly:

Dim tbl As Word.Table = rng.Tables.Add 'Parameters here
'Populate and format the table

3. Now move the position outside the table, using a range
Dim rngTbl =tbl.Range
rngTbl.Collapse wdCollapseEnd
'This is just below the table
rngTbl.Text = "Text between the tables" & vbCR
rngTbl.Collapse wdCollapseEnd
tbl = Nothing
tbl = rngTbl.Tables.Add 'etc.

Here is what I am using:
Word ver 2002
OS XP
VB.Net

In vb.net I need to find a certain location in a Word template, then add
multiple tables fed from a dataset with a line in between each table
containing descriptive text. I have tried creating bookmarks on the fly and
adding a table to each bookmark without much success especially in where and
how they appear.
The tables need to be stacked so to speak on top of one another with a
descriptive line of text in between each table.
One of the main problems I have is in determining how to create the bookmark
locations to be one after the other(possibly with a space in between).
Maybe bookmarks are not the way to go.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
apply a template to existing documents Bubba Gump Shrimp Page Layout 2 July 28th 05 04:46 PM
Word2000 letterhead merge BAW Mailmerge 3 June 25th 05 01:17 PM
is word perfect compatible with office word? Noreen Microsoft Word Help 1 May 11th 05 11:17 PM
In Word, how can I see all files (*.*) in "save as"? citizen53 New Users 8 April 4th 05 04:56 PM
Continuous breaks convert to next page breaks Jennifer Hunt Microsoft Word Help 2 December 30th 04 05:45 PM


All times are GMT +1. The time now is 01:03 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"