O
Oz Springs
I created a text box by my usual way (recording it) and someone very kindly
helped me with a code to set it more professionally by using ³dim² while all
recorded things are ³selection².
The problem is that I have set more features using ³selection² and everytime
I try to set these into ³Dim² code, using VB Help, I get error messages.
My selection macro works fine except that I want to set the text box anchor
point at the top paragraph of the document which does not seem to be
recordable. I want to set it there so if text directly above it moves, the
text box stays where it is.
This is the code I was given:
Dim myTextBox as Shape
Set myTextBox = ActiveDocument.Shapes.AddTextbox( _
Orientation:=msoTextOrientationHorizontal, _
Left:=42.55, Top:=667.65, _
Width:=340#, Height:=69#, _
Anchor:=ActiveDocument.Paragraphs(1).Range)
How can I make my text box anchor where I want it to while keeping all my
recorded settings? Alternatively, would it be better to move everything to
the ³Dim² way in which case I¹ll give you the recorded settings I wanted to
change:
TextframemarginLeft=0# (also right, top & Bottom)
Selection.ShapeRange.Fill.Visible=msoFalse
Selection.ShapeRange.Line.Visible-msoFalse
Thanks for any help
Oz
helped me with a code to set it more professionally by using ³dim² while all
recorded things are ³selection².
The problem is that I have set more features using ³selection² and everytime
I try to set these into ³Dim² code, using VB Help, I get error messages.
My selection macro works fine except that I want to set the text box anchor
point at the top paragraph of the document which does not seem to be
recordable. I want to set it there so if text directly above it moves, the
text box stays where it is.
This is the code I was given:
Dim myTextBox as Shape
Set myTextBox = ActiveDocument.Shapes.AddTextbox( _
Orientation:=msoTextOrientationHorizontal, _
Left:=42.55, Top:=667.65, _
Width:=340#, Height:=69#, _
Anchor:=ActiveDocument.Paragraphs(1).Range)
How can I make my text box anchor where I want it to while keeping all my
recorded settings? Alternatively, would it be better to move everything to
the ³Dim² way in which case I¹ll give you the recorded settings I wanted to
change:
TextframemarginLeft=0# (also right, top & Bottom)
Selection.ShapeRange.Fill.Visible=msoFalse
Selection.ShapeRange.Line.Visible-msoFalse
Thanks for any help
Oz