Re: Need help with border removal in a cell
- From: "Jonathan West" <jwest@xxxxxxxx>
- Date: Sat, 10 Dec 2005 21:32:27 -0000
Hi Xavier
The problem is this line
With .Cell(tbl.Rows.Count - 2, 4).Range
This is applying the following lines to the Range object which marks the text in the cell, not the cell itself. Unfortunately, it is the Cell that has the borders, not the range
You need to change that block so that it reads as follows
With .Cell(tbl.Rows.Count - 2, 4)
.Range.Text = "Here !"
.Borders(wdBorderBottom).LineStyle = wdLineStyleNone
.Borders.Enable = True
End With-- Regards Jonathan West - Word MVP www.intelligentdocuments.co.uk Please reply to the newsgroup Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
"Xavier" <xminet@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:%23DPnjla$FHA.272@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
I've been trying for hours to remove the bottom border of a cell in a Word table. I must be missing something obvious, so I hope someone can help me:
The code I am using (from MS Access VBA) is the following:
With doc.Tables.Item(1)
' removing stuff that works
With .Cell(tbl.Rows.Count - 2, 4).Range .Text = "Here !" .Borders(wdBorderBottom).LineStyle = wdLineStyleNone .Borders.Enable = True End With
' removing other stuff that works as well
End With
For that particular cell, I would like to have no bottom border drawn. I am sure I am referencing the right cell because I am putting the "Here !" text and it appears as expected.
I also checked that other contiguous cells formatting do not interfere with this one (e.g. activating the top border of the cell located under the one for which I want to remove the bootom border).
Any help would be appreciated.
Xavier
.
- Follow-Ups:
- Re: Need help with border removal in a cell
- From: Xavier
- Re: Need help with border removal in a cell
- References:
- Need help with border removal in a cell
- From: Xavier
- Need help with border removal in a cell
- Prev by Date: Re: UserForm Is A Class
- Next by Date: Re: UserForm Is A Class
- Previous by thread: Need help with border removal in a cell
- Next by thread: Re: Need help with border removal in a cell
- Index(es):
Relevant Pages
|
Loading