Posted By: danzaharia | Jul 1st, 2008 @ 8:46 AM
page 1 of 1
Comments: 1 | Views: 746

I am trying to programatically generate a table, but the problem is that this table does break across several pages as it contains quite a large amount of information.  I would like to set up a system whereby whenever the table experiences a page break, it generates the header row of the column again.  Since each row is generated by a loop which retrieves that row's information, outputs it, moves on to the next row, retrieves its information, moves on to the next row...  I want to make an if statement at the beginning of each cycle which should say

If previous row is on a different page from current row

   generate a table header

End If

Unfortunately, I cannot accomplish this using word pageHeaders because I am already putting information in the headers.  Does anyone know a method of accomplishing this or comparing the pages of two rows?  Which property would that be in?  Any assistance would be greatly appreciated.

ZippyV
ZippyV
Fired Up
When you don't know how to program something in Office, you do it manually in the application and then record a macro of the function you want to do in your code. After recording the macro, open it in the visual basic editor. With little changes you can use it in your own code. Here is what came out for me:

    Selection.SelectRow
    Selection.Rows.HeadingFormat = wdToggle

I selected the first row with the headers.
page 1 of 1
Comments: 1 | Views: 746
Microsoft Communities