Solved

Microsoft Word Table - Header, Body, Footer

Posted on 2016-08-04
7
34 Views
Last Modified: 2016-08-04
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
Comment
Question by:maxdbase
  • 4
  • 3
7 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
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
 

Author Comment

by:maxdbase
Comment Utility
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
 

Author Comment

by:maxdbase
Comment Utility
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
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
 

Author Comment

by:maxdbase
Comment Utility
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
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
Comment Utility
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
 

Author Closing Comment

by:maxdbase
Comment Utility
Thank you for the insight and help.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

It is often necessary in this forum and others to illustrate Word fields as text with the field delimiters replaced with the curly brackets that the delimiters resemble when field codes are being displayed on the document. This means that the text c…
If you work with Word a lot, you probably use styles. If you use styles a lot, you've probably balled your fist more often than not when working with the ribbon. In Word 2007/2010, one of the things that I find missing when using styles is a quic…
This video teaches the viewer how to align pictures around text while keeping the text properly aligned in the document.
This video walks the viewer through the process of creating an MLA formatted document, as well as a bibliography with citations.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now