P
PJTewkesbury
Hi,
I am using MS Publisher2003 and I want to use a VBA macro to create a
textbox with borders on the top and bottom of the textbox but NOT the sides.
I have the following VBA code to create a textbox with a border all the way
round, but I can not figure out how to only have the border on just the top
and bottom,
' Create TextBox
Dim s As Shape
Set s = ActiveDocument.Pages(1).Shapes.AddTextbox
(pbTextOrientationHorizontal, doc.LayoutGuides.MarginLeft, pos,
doc.Pages(1).Width - doc.LayoutGuides.MarginLeft -
doc.LayoutGuides.MarginRight, "1.5cm")
s.Name = "ArticalTitle"
' Set font & text properties
s.TextFrame.TextRange.Font.Name = "Times New Roman"
s.TextFrame.TextRange.Font.Size = "18pt"
s.TextFrame.TextRange.Font.Bold = msoTrue
s.TextFrame.TextRange.Text = "Title"
s.TextFrame.AutoFitText = pbTextAutoFitShrinkOnOverflow
' Define Border Properties
s.Line.Weight = "1pt"
s.Line.DashStyle = msoLineSolid
s.Line.ForeColor.RGB = RGB(0, 0, 0)
s.Line.InsetPen = msoFalse
s.Line.Style = msoLineThickBetweenThin
Any help would be appreciated
Peter Tewkesbury
I am using MS Publisher2003 and I want to use a VBA macro to create a
textbox with borders on the top and bottom of the textbox but NOT the sides.
I have the following VBA code to create a textbox with a border all the way
round, but I can not figure out how to only have the border on just the top
and bottom,
' Create TextBox
Dim s As Shape
Set s = ActiveDocument.Pages(1).Shapes.AddTextbox
(pbTextOrientationHorizontal, doc.LayoutGuides.MarginLeft, pos,
doc.Pages(1).Width - doc.LayoutGuides.MarginLeft -
doc.LayoutGuides.MarginRight, "1.5cm")
s.Name = "ArticalTitle"
' Set font & text properties
s.TextFrame.TextRange.Font.Name = "Times New Roman"
s.TextFrame.TextRange.Font.Size = "18pt"
s.TextFrame.TextRange.Font.Bold = msoTrue
s.TextFrame.TextRange.Text = "Title"
s.TextFrame.AutoFitText = pbTextAutoFitShrinkOnOverflow
' Define Border Properties
s.Line.Weight = "1pt"
s.Line.DashStyle = msoLineSolid
s.Line.ForeColor.RGB = RGB(0, 0, 0)
s.Line.InsetPen = msoFalse
s.Line.Style = msoLineThickBetweenThin
Any help would be appreciated
Peter Tewkesbury