Link to home
Start Free TrialLog in
Avatar of brdrok
brdrok

asked on

setting ms word table column width via C#

hello experts,

how do I set the column width of a table in MS Word 2002.

at this point, i am just guessing around.  here is my best guess:

Word.Table table = doc.Tables.Add(r, 1, 8, ref objTableBehavior,      ref objAutoFit);  <--adding table to documnet
Word.Column myCol1 = table.Columns.Item(1);  
myCol1.Width = 5F;

when attempting to run, i get "value out of range" error message.

thanks
ASKER CERTIFIED SOLUTION
Avatar of Farshid-Zaker
Farshid-Zaker

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of brdrok
brdrok

ASKER

Hey Farshid....

i increased the range from 5 to 25 and i have not gotten the errormessage, however, it doesn't seem to have increased the column width at all...

Avatar of brdrok

ASKER

nevermind...i am being too stringy with my width properties....

thanks for your help
you'r welcome :)

<Farshid/>