Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Sandra Williams[_2_] Sandra Williams[_2_] is offline
external usenet poster
 
Posts: 1
Default Problem with Preferred Column widths in Word 2003


I'm importing a number of tables from excel into a Word document. I
have written a simple macro that should set the column widths. Sample
code:
Selection.Columns.PreferredWidthType = wdPreferredWidthPoints
Selection.Columns.PreferredWidth = CentimetersToPoints(4)
When the macro has run, table properties show the column widths to be
what I expect - BUT that isn't what the width actually is. (I can run
the macro on two different tables and get two different sets of column
widths)
What seems to be happening is that the overall table width remains
constant and the column width setting is acting almost like %.

Is there a way to set the absolute column width for each of the
columns? - perhaps a table property that I need to set?

Thank you


--
Sandra Williams
------------------------------------------------------------------------
Sandra Williams's Profile: http://www.officehelp.in/member.php?userid=6085
View this thread: http://www.officehelp.in/showthread.php?t=1355783

Posted from - http://www.officehelp.in

  #2   Report Post  
Posted to microsoft.public.word.tables
Jezebel Jezebel is offline
external usenet poster
 
Posts: 1,384
Default Problem with Preferred Column widths in Word 2003

You need to set the table width also.


"Sandra Williams" wrote in message
...

I'm importing a number of tables from excel into a Word document. I
have written a simple macro that should set the column widths. Sample
code:
Selection.Columns.PreferredWidthType = wdPreferredWidthPoints
Selection.Columns.PreferredWidth = CentimetersToPoints(4)
When the macro has run, table properties show the column widths to be
what I expect - BUT that isn't what the width actually is. (I can run
the macro on two different tables and get two different sets of column
widths)
What seems to be happening is that the overall table width remains
constant and the column width setting is acting almost like %.

Is there a way to set the absolute column width for each of the
columns? - perhaps a table property that I need to set?

Thank you


--
Sandra Williams
------------------------------------------------------------------------
Sandra Williams's Profile: http://www.officehelp.in/member.php?userid=6085
View this thread: http://www.officehelp.in/showthread.php?t=1355783

Posted from - http://www.officehelp.in



  #3   Report Post  
Posted to microsoft.public.word.tables
Sandra Williams[_5_] Sandra Williams[_5_] is offline
external usenet poster
 
Posts: 1
Default Problem with Preferred Column widths in Word 2003


Counter-intuitive but it worked beautifully,
Thank you


--
Sandra Williams
------------------------------------------------------------------------
Sandra Williams's Profile: http://www.officehelp.in/member.php?userid=6085
View this thread: http://www.officehelp.in/showthread.php?t=1355783

Posted from - http://www.officehelp.in

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Column widths change when pasting table rows in Word 2003 daz Tables 0 November 15th 06 02:53 PM
Column widths in Word 2003 JR Tables 2 March 19th 06 01:16 AM
Word is changing my column widths JDGuin Tables 2 March 3rd 06 06:51 AM
How do i have differ column widths for each row in a word table? zulto Tables 1 November 5th 05 03:36 PM
Column widths nanner130 Tables 1 March 2nd 05 03:47 PM


All times are GMT +1. The time now is 02:16 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"