Results 1 to 2 of 2

Thread: VBA code to Format Word Tables though Excel

  1. #1

    VBA code to Format Word Tables though Excel



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I have some tables in a Excel file. There is a VBA code to copy there tables to a Word Document Book2.xlsm. However, height of the rows are higher than required when tables are copied.

    can i reduce the height of the rows in word document by changing existing VBA Code?

  2. #2
    Conjurer WizzardOfOz's Avatar
    Join Date
    Sep 2013
    Location
    Australia
    Posts
    184
    Articles
    0
    Try Google

    from http://msdn.microsoft.com/en-us/libr...ffice.15).aspx
    Code:
         Set newDoc = Documents.Add 
         Set aTable = newDoc.Tables.Add(Range:=Selection.Range, NumRows:=3, NumColumns:=3) 
         aTable.Rows.SetHeight RowHeight:=InchesToPoints(0.5),   HeightRule:=wdRowHeightExactly
    also see http://msdn.microsoft.com/en-us/libr...ffice.15).aspx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •