Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 74
  • Last Modified:

Microsoft Word Table - Header, Body, Footer

I am creating some financial tables using VB Script into existing Word Document tables

Similar to a HTML Table that has thead, tbody, tfoot tags to partition areas for automated insert of rows, cells,
I need this in the Word Tables.

How can I establish areas in a table in such a way that row adds remain within that area?
0
maxdbase
Asked:
maxdbase
  • 4
  • 3
1 Solution
 
GrahamSkanRetiredCommented:
Word tables can treat the first row(s) as special if they set as are Repeat Header Rows. This means that they will be automatically repeated at the top of the rows shown on each page.

Otherwise they are no special rows in a Word table.

You could try to emulate the effect by having three tables where the paragraphs that keep them separate are set to use minimum vertical space.

How is the table to be used? Manual insertion could be guided by different  colours or different border styles. Automated insertion could also do that.
0
 
maxdbaseAuthor Commented:
The three table may be the best route.  There are numerous tables, over 100 in the document.
Each one shall be populated from a data source using vb script.

Here is an example:
http://www.screencast.com/t/gUevYHOEvoU
Note the separate rows for rev and for expense.  I will need to populate these independently

The three table idea is the closest I can imagine to what I need.  However, it would be more convenient to have a way to manage the areas in one table.
0
 
maxdbaseAuthor Commented:
Here is another example of a challenging table.  It has headers in the detail.
So I will be updated multiple collections of rows from vb script:

http://www.screencast.com/t/pOHAQThcP

I am going to see if bookmarking would contain these areas.  

Keeping in one table would prevent column widths from going haywire.

Need help.  Any ideas appreciated
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
GrahamSkanRetiredCommented:
Bookmarking, differential colouring or horizontal borders would each be usable in distinguishing between the conceptual parts of the table.

The main thing to know is how they are going to be used.

In some situations, it might be profitable to use VBA to input to the correct part of the table, or even to combine the table parts into one when all inputting is done.
0
 
maxdbaseAuthor Commented:
I'm using vb script to populate the table.  
That, I believe, is similar to vba.
It sounds like you are saying I can address the  conceptual sections using something like
MyBookMark.rows.addrow.
I think you have helped me a lot.  I'll wait for one last response then reward points
along with my appreciation to you for helping me out.
I'm surprised Microsoft has not added regions to their table object model.
It would be killer!
Cheers,
0
 
GrahamSkanRetiredCommented:
The main difference between VBA and VBScript is the environment.

VBA runs inside a VBA host (Excel, Access, etc). It can address other VBA applications (e.g. it can use the Word object model extension in Excel -hosted VBA:
mytable.rows.add(mytable.rows(2))

Open in new window

0
 
maxdbaseAuthor Commented:
Thank you for the insight and help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now