Word Macro - Table creation

B

bishu

I have a macro which creates a table on the word document and puts data in it.Folowing is the code which actually does it, i mean the table creation.This code is in a iterative loop , ie it creates 10 rows depending on the loop counter set to 10

Word.ActiveDocument.Tables.Add Range:=Word.Selection.Range,
NumRows:=1, NumColumns:=cnu
Word.Selection.Columns.SetWidth ColumnWidth:=48, RulerStyle:=wdAdjustProportiona

Problem is watever parameter i give the cell (1,1) is displayed with different width...am not able get it right on the document.Anybody have any suggetions to get this right

please mail me at (e-mail address removed)
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?YmlzaHU=?=,

1. Which version of Word are we dealing with?

2. Has any data been entered in the cell

3. What result are you seeing in the document?
I have a macro which creates a table on the word document and puts data in it.Folowing is the code which actually does it, i mean the table creation.This code is in a iterative loop , ie it creates 10 rows depending on the loop counter set to 10.

Word.ActiveDocument.Tables.Add Range:=Word.Selection.Range, _
NumRows:=1, NumColumns:=cnum
Word.Selection.Columns.SetWidth ColumnWidth:=48, RulerStyle:=wdAdjustProportional

Problem is watever parameter i give the cell (1,1) is displayed with different width...am not able get it right on the document.Anybody have any suggetions to get this right.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :)
 

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