I found out that even if the four double/tripple line styles known from
previous Word versions are not available in the user interface in Word 2007,
you have access to the line styles via VBA – and this means that you can use
a macro to apply a double/tripple line style. As Greg said, once you have
such line in a Word 2007 document, you can change the line style of that line
to one of the other double/tripple line styles via the Format AutoShape
dialog box.
The macro below creates a 5 cm long horizontal line and applies the “two
thin lines†line style (the remaining line styles are listed below the
macro). For further details, see the comments in the macro.
--------------------
Sub AddLineShape_DoubleLineStyle()
Dim oShape As Shape
Dim nStartHor As Single
Dim nStartVer As Single
'Find the point where the top and left margins intersect
'Use this point as the starting point for the line
nStartHor = ActiveDocument.PageSetup.LeftMargin
nStartVer = ActiveDocument.PageSetup.TopMargin
With ActiveDocument
'Create a vertical line, length 5 cm
Set oShape = .Shapes.AddLine(nStartHor, nStartVer, nStartHor +
CentimetersToPoints(5), nStartVer)
With oShape
.Line.Style = msoLineThinThin
.Line.Weight = 3
End With
End With
'Clean up
Set oShape = Nothing
End Sub
--------------------
To apply one of the other double (or tripple) line styles, replace the code
lines:
.Line.Style = msoLineThinThin
.Line.Weight = 3
with the appropriate set of lines below:
.Line.Style = msoLineThinThick
.Line.Weight = 4.5
or
.Line.Style = msoLineThickThin
.Line.Weight = 4.5
or
.Line.Style = msoLineThickBetweenThin
.Line.Weight = 4.5
--
Regards
Lene Fredborg - Microsoft MVP (Word)
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word