Have an account? Sign in
"*" indicates required fields
You agree that CreativePro Network may send you emails, including the newsletter selections above. You can unsubscribe at any time.
By signing in, you agree to our Terms of Use and acknowledge our Privacy Notice.
New user? Create an account
By signing in, you agree to our Terms of Use and acknowledge our Privacy Notice.
Yeah, I ran into that problem. Some of the tables had the first row as a header and some of them did not have a header but did have the 1st body row a different color and used like a header.
I ended up using the following along with Jong’s poser https://creativepro.com/tackling-tables-through-scripting.php to merge the first body row and it worked great.
table.cells.item(0).merge(table.rows.item(0).cells.item(-1));
But the tables with headers caused the script not to work. I found some code that allowed me to convert body rows to header rows but it wouldn’t work in reverse so I did it the harder way. Only the first 3 pages of the 100 page doc had actual header so I moved them to a new document, ran the script, then merged the documents back together.
table.rows.item(0).rowType = RowTypes.bodyRow;
Actually, it does work but only when I select the table. I get an error when I use it with Jong’s code in that URL to do the entire document.
This site uses cookies, but not the kind you eat. We use cookies to remember log in details, provide secure log in, improve site functionality, and deliver personalized content. By continuing to browse the site, you accept cookies.