[RESOLVED] how to align a table in Word VB.net 2008
Hello, I have a word document created in VB.net, but I need to do is center align the table (but not the contents of it). the contents has their own alignments arranged, so how to align the table itself. this way I am putting it into the middle of the page so it would look better.
I got this to align the cells:
Code:
oTableHdng.Cell(1, 1).Range.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphLeft
I tried this to align the table but it doesn't do anything, besides this apply to paragraphs so that's probably not what I need but I couldn't find anything else:
Code:
oTableHdng.Range.Paragraphs.Alignment = WdParagraphAlignment.wdAlignParagraphCenter
Re: how to align a table in Word VB.net 2008
Hi I don't have access to vb.net at the moment but try something like this
Selection.Tables(1).Rows.Alignment = wdAlignRowCenter
Re: how to align a table in Word VB.net 2008
that really helped, works, thanks a lot
Code:
oTableHdng.Range.Tables(1).Rows.Alignment = WdRowAlignment.wdAlignRowCenter
Re: how to align a table in Word VB.net 2008
Kool :D
If your query is solved then do remember to mark this thread resolved :)