Minimum column width in Word table

H

Harry Kable

Hi. I need to create strictly formatted Word documents using VBA from Access.
I need column widths as small as 1 mm. Even setting the L-R cell padding to
0, the minimum column width using VBA is 4.2 mm - a "Value out of range"
error occurs otherwise. However, after the table is created and displayed in
Word the column width can be manually adjusted to 1 mm. Any suggestions?
Thanks
 
G

Graham Mayor

I don't know to what extent Access vba affects this, but

With Selection.Tables(1)
.LeftPadding = CentimetersToPoints(0)
.RightPadding = CentimetersToPoints(0)
.Spacing = 0
End With
Selection.Columns.PreferredWidth = CentimetersToPoints(0.1)

works for me in Word 2003 and 2007?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
H

Harry Kable

Thanks Graham. Works a treat from Access 2003 to Word 2007. I was missing the
..Spacing property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top