B
Brian Craigie
Hi,
Publisher 2002/Office XP
Can anyone tell me how to create a border round a text box (one of the
built-in border art ones) while creating it from VB?
The box is created thus (so far):-
Set pubdoc = appPub.ActiveDocument.Pages(1)
With pubdoc
Set TextBox = .Shapes.AddTextbox _
(Orientation:=pbTextOrientationHorizontal, _
Left:=144, Top:=144, _
Width:=72, Height:=18)
With TextBox
.TextFrame.TextRange.Text = "some text"
End With
End With
I created one in Publisher, then used VB to open the document and work
through the Shapes collection to show me the styles etc, but I can't
see anything that tells me what the Border Art style is set to.
According to the help, the Line property "Returns a LineFormat object
that contains line formatting properties for the specified shape. (For
a line, the LineFormat object represents the line itself; for a shape
with a border, the LineFormat object represents the border.)", but I
can see no property in LineFormat that mentions Border Art, and no
listing of any style names anywhere.
(.Shape.Line.Style = 1 in both a text box with a border, and in one
without, so doesn't seem to be the style property that sets it).
Can anyone point me in the right direction please?
Many Thanks,
Brian
Publisher 2002/Office XP
Can anyone tell me how to create a border round a text box (one of the
built-in border art ones) while creating it from VB?
The box is created thus (so far):-
Set pubdoc = appPub.ActiveDocument.Pages(1)
With pubdoc
Set TextBox = .Shapes.AddTextbox _
(Orientation:=pbTextOrientationHorizontal, _
Left:=144, Top:=144, _
Width:=72, Height:=18)
With TextBox
.TextFrame.TextRange.Text = "some text"
End With
End With
I created one in Publisher, then used VB to open the document and work
through the Shapes collection to show me the styles etc, but I can't
see anything that tells me what the Border Art style is set to.
According to the help, the Line property "Returns a LineFormat object
that contains line formatting properties for the specified shape. (For
a line, the LineFormat object represents the line itself; for a shape
with a border, the LineFormat object represents the border.)", but I
can see no property in LineFormat that mentions Border Art, and no
listing of any style names anywhere.
(.Shape.Line.Style = 1 in both a text box with a border, and in one
without, so doesn't seem to be the style property that sets it).
Can anyone point me in the right direction please?
Many Thanks,
Brian