P
Piet
Hello everybody.
For some scientific report work, I would like to automate the process
of table generation in Word. I discovered a problem when centering
tables. When I manually select all the cells and apply a paragraph
format, only the cells will be formatted in the desired way and the
position of the complete table will remain unchanged. However, when I
include in my selection the special cell characters outside the table
at the end of each row (sorry, I dont know how these are called
correctly) than the table as a whole is formatted in the desired way.
The following macro
Sub completeTableFormatting()
ActiveDocument.Tables(1).Select
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
End Sub
selects the complete table including the special cell characters but
applies the formatting only to all of the cells. Is there a way to
format the table as a whole?
Many thanks
Piet
For some scientific report work, I would like to automate the process
of table generation in Word. I discovered a problem when centering
tables. When I manually select all the cells and apply a paragraph
format, only the cells will be formatted in the desired way and the
position of the complete table will remain unchanged. However, when I
include in my selection the special cell characters outside the table
at the end of each row (sorry, I dont know how these are called
correctly) than the table as a whole is formatted in the desired way.
The following macro
Sub completeTableFormatting()
ActiveDocument.Tables(1).Select
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
End Sub
selects the complete table including the special cell characters but
applies the formatting only to all of the cells. Is there a way to
format the table as a whole?
Many thanks
Piet