c# - How do you get text in a Word table to vertical align? -


i creating word document on fly c# vs 2010 office word project client wants able generate document allow appropriate number of signatory locations particular deal going down. there table need generated sufficient rows , later in doc have produce prefab blocks personal info per signatory.

i working on table part , have want it, text in of cells vertically top aligned. have visited every site in entire internet in past few days up-to-date information on word automation current .net 4, vs 2010 , office 2010. have syntax compiles w/o error fails bottom align desire. have stabbed intellisense see if find solution.

this code focuses on single row:
tbl.range.rows[1].cells.verticalalignment = word.wdcellverticalalignment.wdcellalignverticalbottom; runs text stays helium-filled.

any word automation wizards out there?

the text centered vertically, incudes paragraph spacing other "0." so, word viewing line additional text needs included in vertical centering.

to around this, highlight text want vertically centered (or entire table if want). go "page layout" , reduce "spacing" "after" "0." if have space on top of text, need reduce "spacing" "before" "0" well. no spacing before or after text, actual text centered.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -