Yet Another GIS Blog
GIS, Geography, Programming, and Neogeography

Set Row Height in MS Publisher

Monday, 9 November 2009 16:54 by boxshapedwo

You might need to know how to do this one day in your life.  I never thought I would.

 There is no easy way to set the row height of a table in MS Publisher.  So it is quite easy to have your rows be set unevenly.  I never found a distribute function either.

 One work around is to set the row height using VBA:

Private Sub changeRows()
  
    Dim i As Integer
    i = 1
    Dim RowHeight As Double
    RowHeight = 15.5 'ThisDocument.Selection.ShapeRange(1).Table.Rows(i).Height
   
    For i = 1 To ThisDocument.Selection.ShapeRange(1).Table.Rows.Count Step 1
        ThisDocument.Selection.ShapeRange(1).Table.Rows(i).Height = RowHeight
    Next
   
End Sub

 

This code only works if you have your row heights selected.  The idea was taken from here, but modified to loop through the rows.

Categories:   Programming
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Comments

Comments are closed