Killian
03-10-2005, 08:59 AM
Hi all,
I have a bit of "unexpected behaviour" in Word (2003) I'm hoping to resolve with someone's help.
I have a template that uses a few table styles. All these Table styles have a 1pt border on the top and bottom of the whole table and one of them uses stripes (alternate 25% grey shading on the rows).
My first problem was that when applying a style from the task pane, the default behaviour was to have 'Apply special formats to:' switched on for first/last row/column. There doesn't seem to be a way of saving these preferences with the style. Is there a way of doing that???
I got round that by adding my styles to my custom toolbar and running this code: With Selection.Tables(1)
'the style names match the button captions so it's one routine for all
.Style = Application.CommandBars.ActionControl.Caption
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = False
.ApplyStyleFirstColumn = False
.ApplyStyleLastColumn = False
End With
Problem solved? No, I run this code from my tool bar and the border on the bottom of the table doesn't always appear. I can only make it appear by running the code and then pressing Ctrl+Y!!??? If run the code twice it still makes no difference.
Stumped :dunno
I have a bit of "unexpected behaviour" in Word (2003) I'm hoping to resolve with someone's help.
I have a template that uses a few table styles. All these Table styles have a 1pt border on the top and bottom of the whole table and one of them uses stripes (alternate 25% grey shading on the rows).
My first problem was that when applying a style from the task pane, the default behaviour was to have 'Apply special formats to:' switched on for first/last row/column. There doesn't seem to be a way of saving these preferences with the style. Is there a way of doing that???
I got round that by adding my styles to my custom toolbar and running this code: With Selection.Tables(1)
'the style names match the button captions so it's one routine for all
.Style = Application.CommandBars.ActionControl.Caption
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = False
.ApplyStyleFirstColumn = False
.ApplyStyleLastColumn = False
End With
Problem solved? No, I run this code from my tool bar and the border on the bottom of the table doesn't always appear. I can only make it appear by running the code and then pressing Ctrl+Y!!??? If run the code twice it still makes no difference.
Stumped :dunno