View Single Post
 
Old 09-25-2015, 11:48 PM
CodingGuruInTraining CodingGuruInTraining is offline Windows Vista Office 2010 32bit
Novice
 
Join Date: Sep 2015
Posts: 13
CodingGuruInTraining is on a distinguished road
Default

That just about did it! Would you be willing to explain what this code is doing so I know where I went wrong? Also, I'm experiencing some minor issues when I run this code:
- The tables as a whole are left aligned, then some are halfway off the left side. How could you make them centered in the page?
- When I try to add code to repeat the first row, I get an error again about merged cells. Is it a matter of where it is placed in the code or how? I've been trying this code:
Code:
Tbl.Rows(1).HeadingFormat = True
- The table gets messed up when it comes across unmerged cells in column 1 (for obvious reasons), which can happen often with these documents. Could there be a check added to see if the cells are merged first and to merge them if they are not? I am thinking something like this (I know this isn't correct, but I'm still learning):
Code:
If Case 1: .Cells.Merge = False Then
            .Cells.Merge
            Else Next
- I'd like the horizontally merged cells to be a set height, but still be able to expand if too much content is added (AutoFit I think). My first attempt was with the following code, but it didn't seem to do anything.
Code:
If .Cells().Width = InchesToPoints(6.21) Then
                    .Cells.Height = InchesToPoints(0.8)
                End If
I got some other formatting tweaks figured out, but I haven't been able to figure out the ones above yet. Any suggestions would be appreciated!
Reply With Quote