A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Macro to add horizontal double-border to single cell



 
 
Thread Tools Display Modes
  #1  
Old October 25th, 2007, 07:21 PM posted to microsoft.public.word.tables
jlarge
external usenet poster
 
Posts: 4
Default Macro to add horizontal double-border to single cell

Hi all,

I am trying to modify a macro that I found online to apply a horizontal
double-border to a single cell but I am not getting anywhere. Can someone
please help?

Starting point - http://support.microsoft.com/default.aspx/kb/209216

Thanks!!!
  #2  
Old October 25th, 2007, 07:45 PM posted to microsoft.public.word.tables
jlarge
external usenet poster
 
Posts: 4
Default Macro to add horizontal double-border to single cell

I just re-read my post and perhaps I wasn't too clear. The macro I found
applies a double-line border all around the cell. I want the border applied
horizontally on the bottom only. Thanks
  #3  
Old October 25th, 2007, 10:39 PM posted to microsoft.public.word.tables
Lene Fredborg
external usenet poster
 
Posts: 1,294
Default Macro to add horizontal double-border to single cell

The following macro applies a double underline to the bottom of the selected
cell (if more cells are selected, the border is only applied to the first
cell):

Sub BorderCell()

If Selection.Information(wdWithInTable) Then

'Apply double bottom border to table cell
With Selection.Cells(1).Borders(wdBorderBottom)
.LineWidth = wdLineWidth050pt
.LineStyle = wdLineStyleDouble
End With

Else

MsgBox "Insertion point is not in a Word table"

End If

End Sub

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word


"jlarge" wrote:

Hi all,

I am trying to modify a macro that I found online to apply a horizontal
double-border to a single cell but I am not getting anywhere. Can someone
please help?

Starting point - http://support.microsoft.com/default.aspx/kb/209216

Thanks!!!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:01 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.