![]() |
#1
|
|||
|
|||
![]()
ResizeTableWidth.zip
Please see the attachment (the VBA codes inside) I want to resize the second table width. The problem is: there seems to be no Tables(index).Width in Word VBA I know there is PreferredWidth But I want to resize the last column width only. I have already written the codes to do so in the attached file. But I wonder if there is a simpler way to do so in VBA. Please take a look if you are interested. |
#2
|
||||
|
||||
![]()
Hi tinfanide,
There is no attachment to your post - just an invlaid link. However, try something along the lines of: Code:
Sub Demo() With ActiveDocument.Tables(2) .Columns(.Columns.Count).Width = CentimetersToPoints(2#) End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
The link is not working?
Anyway, just came up with a similar solution like yours. Thanks. |
#4
|
||||
|
||||
![]()
Hi tinfanide,
Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
![]()
Yeah... I don't know why. I did download it and open it on my machine. But when I tried that again at my friend's home, it said it was broken.
|
#6
|
||||
|
||||
![]()
For future reference, you might do better attaching files via the paperclip symbol on this forum's 'Go Advanced' tab.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Jamal NUMAN | Word | 1 | 04-24-2011 06:44 PM |
![]() |
Jonart | Word | 2 | 03-31-2011 10:51 PM |
Control cell width and wrapping in table. | gcowan | Word Tables | 0 | 07-07-2010 11:28 AM |
Resize-to-fit Table Columns (PowerPoint) | icu222much | PowerPoint | 0 | 06-06-2010 11:21 AM |