![]() |
|
|||||||
|
|
|
Thread Tools | Display Modes |
|
|
|
#1
|
||||
|
||||
|
The code works fine for me, though I note you're still not structuring your code consistently. For your own benefit, at least, you really need to address that.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#2
|
|||
|
|||
|
Is it the borders code that is inconsistent. I would like to make the code as good as possible. Not sure what you mean by inconsistent.
|
|
#3
|
||||
|
||||
|
Quote:
That said, you could replace all of: Code:
.ApplyStyleLastRow = False
.ApplyStyleFirstColumn = True
.ApplyStyleLastColumn = False
.ApplyStyleRowBands = True
.ApplyStyleColumnBands = False
.Borders(wdBorderLeft).LineStyle = wdLineStyleNone
.Borders(wdBorderRight).LineStyle = wdLineStyleNone
.Borders(wdBorderTop).LineStyle = wdLineStyleNone
.Borders(wdBorderBottom).LineStyle = wdLineStyleNone
.Borders(wdBorderHorizontal).LineStyle = wdLineStyleNone
.Borders(wdBorderVertical).LineStyle = wdLineStyleNone
.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
.Borders.Shadow = False
Code:
.Borders.Enable = False Code:
With wdTbl
...
With .Columns(1)
.PreferredWidthType = wdPreferredWidthPoints
.PreferredWidth = CentimetersToPoints(3)
End With
With .Columns(2)
.PreferredWidthType = wdPreferredWidthPoints
.PreferredWidth = CentimetersToPoints(13)
End With
https://www.msofficeforums.com/word-...ated-word.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#4
|
|||
|
|||
|
Paul I took on your the verbose approach and used
Code:
'1cm=28points
With .Columns(1)
.Width = 84
End With
With .Columns(2)
.Width = 364
End With
|
|
| Tags |
| add, tables, vba |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding furigana to a Word document | rjribbit | Word | 0 | 12-03-2015 09:33 AM |
Inexperienced user having dificulty adding text to document I created. Fixed text moves around.
|
Athalwolf | Word | 2 | 02-08-2015 09:08 AM |
Error message opening a document in Word "Word cannot open this file because it is larger than 512 M
|
poonamshedge | Word | 2 | 09-11-2014 06:11 AM |
Adding and Moving parts of a document in Word
|
PauledInAction | Word | 4 | 07-13-2012 02:38 PM |
| Adding bullets in a protected Word document | Cindylu3 | Word | 0 | 10-03-2008 03:16 PM |