Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2005

Tip: Looking for answers? Try searching our database.

table column line up problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Staroslav - 26 Apr 2005 13:15 GMT
Sometimes tables in Word get messed up and the columns don't line up
properly. Does any one know of a quick way to fix that problem? At this
point, I either have to recreate a portion or the whole table or fiddle
around with lines of columns until they "click" into place.
This happens more often than I wish, so any help will be greatly appreciated!
Signature

Greetings from Moscow, Russia

Helmut Weber - 26 Apr 2005 14:27 GMT
Hi Staroslav,

the question is, what width sould the cell have?

This one adjusts all cells to the first cell in a column,
hoping, the first cell has the right width.
Other ways of coding might be preferable,
if higher performance is necessary.
---
Dim c As Long   ' column
Dim r As Long   ' row
Dim w As Single ' width
With ActiveDocument.Tables(1)
  For c = 1 To .Columns.Count
     w = .Cell(r, 1).Width
     For r = 2 To .Rows.Count
         .Cell(r, c).Width = w
     Next
  Next
End With
---

Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
Staroslav - 26 Apr 2005 14:44 GMT
Thank you Helmut, this doesn't quite do it, but it gave me an idea that
should work. I need to write a macro that identifies the problem cell
(current selection), and sets its width as the cell right above it, which
should be the good cell. I guess cell index should be used to avoid mix up.
I'll try working on it.
vs

> Hi Staroslav,
>
[quoted text clipped - 22 lines]
> "red.sys" & chr(64) & "t-online.de"
> Word 2002, Windows 2000
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.