[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

setting ms word table column width via C#

Posted on 2004-10-22
4
Medium Priority
?
2,430 Views
Last Modified: 2008-01-09
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
0
Comment
Question by:brdrok
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
Farshid-Zaker earned 400 total points
ID: 12385464
Hi,
In fact there is lower limit for a word table column's width. You should use values greater than 10.

<Farshid/>
0
 
LVL 7

Author Comment

by:brdrok
ID: 12399521
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...

0
 
LVL 7

Author Comment

by:brdrok
ID: 12399628
nevermind...i am being too stringy with my width properties....

thanks for your help
0
 
LVL 4

Expert Comment

by:Farshid-Zaker
ID: 12399643
you'r welcome :)

<Farshid/>
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question