Tables with borders.... i wish!

R

Rob

When I run a macro from my document in Word 97 a table is
created and the borders are automatically added but when
I perform the same operation in word XP the borders are
non-existant. I do not understand why, even though if
you insert a table manually the border are there (in
XP). Is this a bug or do I need to write a macro to draw
the lines back in. Is there a setting i'm missing? I
just don't know!!!! Please help.

Regards

Rob
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

Hi Rob,

Use

Dim newtable As Table
Set newtable = ActiveDocument.Tables.Add(Selection.Range, 3, 4)
With newtable.Borders
.InsideLineStyle = wdLineStyleSingle
.OutsideLineStyle = wdLineStyleSingle
End With


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 
R

Rob

Thanks Doug, Much appreciated
-----Original Message-----
Hi Rob,

Use

Dim newtable As Table
Set newtable = ActiveDocument.Tables.Add (Selection.Range, 3, 4)
With newtable.Borders
.InsideLineStyle = wdLineStyleSingle
.OutsideLineStyle = wdLineStyleSingle
End With


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP



.
 

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