?
Solved

Microsoft Word Table - Header, Body, Footer

Posted on 2016-08-04
7
Medium Priority
?
59 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 41743183
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
ID: 41743234
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
ID: 41743250
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 76

Expert Comment

by:GrahamSkan
ID: 41743314
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
ID: 41743395
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 2000 total points
ID: 41743462
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
ID: 41743475
Thank you for the insight and help.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …
Suggested Courses

762 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