Rashid,
It's usually better to code the Range object than the Selection object, but
cases like this is where I make an exception. Try replacing this block of
code:
With .Rows(.Rows.Count) ...
...Underline = wdUnderlineDouble
with this block of code:
oTable.Select
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.SelectRow
With Selection.Borders(wdBorderTop)
.LineStyle = Options.DefaultBorderLineStyle
.LineWidth = Options.DefaultBorderLineWidth
.Color = Options.DefaultBorderColor
End With
Selection.Font.Underline = wdUnderlineDouble
Regards,
Chad
> Hi Chad,
> Thanks for your reply. Your macro does not work on my document.. It gives
[quoted text clipped - 51 lines]
> > > >
> > > > TIA
Rashid Khan - 24 Aug 2004 18:29 GMT
Hi Chad
The macro runs perfectly... but it stopped on one of the table giving Run
Time error 4604...saying "The SelectRow method or property is not available
because some or all of the object does not refer to a table" and highlights
Selection.SelectRow.
Anyhow most of the table are done as I desired... I am just informing u
about the error. However for your information.. the code I am running on is
on a document which has been OCRed...
Thanks a lot for all the help
Rashid
> Rashid,
>
[quoted text clipped - 77 lines]
> > > > >
> > > > > TIA