A
Alex St-Pierre
Hi!
I use Automation to copy, paste and format a table from Excel to Word. I'm
wondering how to split the table into Word. The table can be composed of 10
groups, each group have a couple of rows. Also, there's comments that is
attached to specific group.
Sample example: 10 groups, 3 rows each and 1 comment for each group that is
shown at the end of each page.
n = fNbGroup(iRow) = return the group number of the row #i
x = fLastRow(iGroup) = return the last row of the group #i
c = fComment(iGroup) = return the number of comment from group #1 to groun #i
s = fDisplayComment(iGroup) = return the comment attached to group #i
the word table is composed of 30 rows, only 20 can be displayed on the first
page.
Is there a way to have function that will maximize the number of group
displayed into the first page. Like
test#1: 6 groups and 3 comments (not enought space for comments)
test #2: 5 groups and 6 comments (ok)
and after that, I will know that the table has to be split after the group
#5 and the 5 first comments will be displayed at the end of page #1..
So, the program could check first, which row is on page #2 and split the
table at the group before.. Then, try to see if there is enought space for
comments. If not then, split the group before and put the comments. Any idea?
Thank you!
Alex
I use Automation to copy, paste and format a table from Excel to Word. I'm
wondering how to split the table into Word. The table can be composed of 10
groups, each group have a couple of rows. Also, there's comments that is
attached to specific group.
Sample example: 10 groups, 3 rows each and 1 comment for each group that is
shown at the end of each page.
n = fNbGroup(iRow) = return the group number of the row #i
x = fLastRow(iGroup) = return the last row of the group #i
c = fComment(iGroup) = return the number of comment from group #1 to groun #i
s = fDisplayComment(iGroup) = return the comment attached to group #i
the word table is composed of 30 rows, only 20 can be displayed on the first
page.
Is there a way to have function that will maximize the number of group
displayed into the first page. Like
test#1: 6 groups and 3 comments (not enought space for comments)
test #2: 5 groups and 6 comments (ok)
and after that, I will know that the table has to be split after the group
#5 and the 5 first comments will be displayed at the end of page #1..
So, the program could check first, which row is on page #2 and split the
table at the group before.. Then, try to see if there is enought space for
comments. If not then, split the group before and put the comments. Any idea?
Thank you!
Alex