View Full Version : Word Tables
ABrown
08-21-2008, 04:33 AM
I wonder if anyone knows how to add code that will control the default table settings. ie. when I insert a table via any of the many way of doing it ie. via table insert, from the icon on toolbar, can I change the options for all of them? I want the user to have a set 0.2 margin top and bottom to the cells and a particular style applied when the insert a table into a document. Many thanks in advance. Annette:help
TonyJollans
08-21-2008, 01:37 PM
What version of Word are you using? Basically you modify the style and set it as default but the precise steps vary according to version.
ABrown
08-22-2008, 01:30 AM
Thanks Tony (ps site looks good!) - do you mean the default Table Grid style - perhaps I can expand the problem slightly..... I have designed a template for the law firm I work for with unique styles. The problem is when a table is inserted it will adopt the style of the paragraph is it is in, for example, we have designed a style MT BT which has effectively replaced Normal. If we draw a table at a paragraph mark with that style applied the whole table adopts that style, likewise any other style that may have been applied. If we apply Normal then we get the default Table Grid style, but we do not want to use Normal in our template as we use documents from many law firms that corrupt our templates, hence the unique styles. What I guess I am asking is if there is away to "control" the insert table function - problem is there are about 10 different ways to do that!! We are using Word 2003 with sp3 patch. Any help would really be appreciated. Many thanks.
Annette.
TonyJollans
08-22-2008, 03:00 AM
Hi Annette,
I don't draw tables, myself, but I have just had a play with it and I see the problem - I don't know what, if anything, controls that. If you insert a table in another way it should adopt whatever style you have set as default - it doesn't have to be Table Grid.
Table Styles do have their, shall we say, idiosyncracies, and it doesn't surprise me that you can't get total consistency. There may be a way to trap the action (I think you could do it with the SelectionChange event) but it would probably be complex and have some side effects - it would probably be easier to have a button somewhere to click that applied a style after creation (although I don't know that that would meet your needs as it would require user action).
ABrown
08-22-2008, 03:51 AM
Thanks Tony - I am not quite sure if a button will do the job - attorney's just don't do what they are told!!! Back to the drawing board! Thanks again. Annette
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.