Word VBA Add Table Rows and Duplicate Tables

Anonymous
2018-07-07T03:57:57+00:00

Hi,

My work is switching from daily case notes to monthly case notes. They are currently in a table... I was previously using forms and bookmarks to automate them, but that is not going to work now that I will have to have duplicated tables in one doc.

Each day will need to be its own table (I think). I will potentially need to add single or multiple rows in the middle of those tables depending on the day's activities.  Each of those rows has its own form content (legacy or activex, it doesn't really matter to me) that needs to copy over when the rows AND when the table copies. The best way to do this would be with buttons, because many people who have very little computer literacy will be using it (the type of people who are confused by keyboard shortcodes).

Since I don't see away to attach a sample, I will include a screenshot:

On the left hand side is what a blank table looks like. On the right hand side is an example of what one day *could* look like.

1/Green - Each Activity can have multiple times

2/Blue - There could be three activites (each having multiple times) per day. Each activity will have its own daily time summary (2a) and Activity Description (2b)

3/Red - Is the entire day summary from date to electronic signature.

I can get the table to add a row, I do not know how to add a button that adds a row to a specific table when there are multiple (unknown, not yet created) tables in a document. And I do not know how to copy everything, including the buttons and potentially bookmarks, to a new table and have it work for only that specific table.

I have the code to protect and unprotect the document during changes through a call routine, but otherwise it will likely be protected. See: computer illiterate people using it.

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

8 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Anonymous
    2018-07-08T23:45:53+00:00

    I will absolutely send it to you via email in just a minute. For the formatting record, no vertical merges whatsoever.

    Thank you 

    Was this answer helpful?

    0 comments No comments
  3. Doug Robbins - MVP - Office Apps and Services 323.5K Reputation points MVP Volunteer Moderator
    2018-07-08T23:35:37+00:00

    As I anticipated, there is a lot more to this that simply adding or inserting a row (and I assume that by #2, you perhaps meant #3)

    In an earlier message, when you indicated that you had turned off the display of some of the cell borders was that in the first column, or are the cells in that column merged?

    Can you send me a document that contains such a table so that I can see exactly what you have.

    Was this answer helpful?

    0 comments No comments