Vertical Alignment

M

mully

Hi All

I have a table that consists of 12- Columns and 65- Rows it is an Excel
sheet that I Copy and Paste Special as Formatted Text (RTF) in to Word -- is
there a macro about that on clicking a new added button to the Toolbar --
that would automatically Vertically Align (Centre) all the Text and Numbers
in their respective cells.

Any help much appreciated

Cheers ---- Mully
 
J

Jay Freedman

Hi All

I have a table that consists of 12- Columns and 65- Rows it is an Excel
sheet that I Copy and Paste Special as Formatted Text (RTF) in to Word -- is
there a macro about that on clicking a new added button to the Toolbar --
that would automatically Vertically Align (Centre) all the Text and Numbers
in their respective cells.

Any help much appreciated

Cheers ---- Mully

You don't really need a macro. You can just select the whole table, go
to Table > Table Properties > Cell, and click the Center button under
"Vertical Alignment".

If you really, really want a macro on a one-click button, use this:

Sub TableVertCenter()
If Selection.Information(wdWithInTable) Then
Selection.Tables(1).Range.Cells.VerticalAlignment _
= wdCellAlignVerticalCenter
End If
End Sub
 
S

Suzanne S. Barnhill

And if, like me, you've added "Vertical alignment" to every table-related
shortcut menu, you can do it with a right-click. <g>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top