Indenting a newly added table in Word

E

Evets17

I have a fairly simple word automation situation that I'm struggling with how
to accomplish.

I'm using VB.net and VSTO document level, but that likely isn't too relative
to my question.

I'm creating a new table, via code, in word and I want to indent/move the
whole table object to the right. I've tried several techniques but have been
only able to indent the actual text(values) of the table, not the whole table
itself. So hoping someone can help me with how to indent a table.

My code for adding the table is below (table adds fine, I just want it
indented/moved to the right several characters.):
Dim tbl As Word.Table
Dim lRows As Long, lCols As Long

Dim rng As Word.Range =
Globals.ThisDocument.Sr_reportOutstandingIncidentsNode.Range
lRows = 1
lCols = 2
tbl = rng.Tables.Add(rng, lRows, lCols)
 
J

Jonathan West

Set the LeftIndent property of the Rows object of the Table to the value you
want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top