D
david.f.jenkins
I have two "mysterious" problems concerning my use of VBA-generated
textboxes. I don't know if they're connected or not. Here's the nut
of the code I'm using:
dim tBoxsh as shape
Set tBoxSh =
ActiveWindow.View.slide.Shapes.AddTextbox(msoTextOrientationHorizontal,
-16.375, 120.75, 240!, 60.5!)
tBoxSh.Tags.Add "Type", "EditorComment"
tBoxSh.Select
With tBoxSh
.IncrementTop 0.62
' fill parameters
.Fill.Visible = msoTrue
.Fill.Solid
.Fill.ForeColor.RGB = RGB(255, 255, 0)
.Fill.Transparency = 0#
' line parameters
.Line.Weight = 2#
.Line.Visible = msoTrue
.Line.ForeColor.RGB = RGB(255, 0, 0)
.Line.BackColor.RGB = RGB(255, 255, 255)
' textbox scaling for size
' .ScaleWidth 14.8!, msoFalse, msoScaleFromTopLeft
' .ScaleHeight 1.48!, msoFalse, msoScaleFromTopLeft
Question 1: If I leave the scaling instructions in, AND leave the
cursor in one of the generated text boxes, AND generate a second text
box, it comes out wider than the first one. If I put the insertion
point someplace outside of the first textbox, and then generate a
second one, it comes out the same width as the first. By expanding
the widths in the AddTextBox call and commmenting out the ScaleWidth
statements, this behavior went away.
Question 2: My users report (and I have seen this myself, but very
seldom, and not in the last 6 weeks or so) that occasionally when they
generate one of these text boxes, it ends up on the screen extremely
wide and narrow - extending way, way beyond the right side of the
slide. This is not a freely reproducible phenomenon - anybody know
what's going on there?
textboxes. I don't know if they're connected or not. Here's the nut
of the code I'm using:
dim tBoxsh as shape
Set tBoxSh =
ActiveWindow.View.slide.Shapes.AddTextbox(msoTextOrientationHorizontal,
-16.375, 120.75, 240!, 60.5!)
tBoxSh.Tags.Add "Type", "EditorComment"
tBoxSh.Select
With tBoxSh
.IncrementTop 0.62
' fill parameters
.Fill.Visible = msoTrue
.Fill.Solid
.Fill.ForeColor.RGB = RGB(255, 255, 0)
.Fill.Transparency = 0#
' line parameters
.Line.Weight = 2#
.Line.Visible = msoTrue
.Line.ForeColor.RGB = RGB(255, 0, 0)
.Line.BackColor.RGB = RGB(255, 255, 255)
' textbox scaling for size
' .ScaleWidth 14.8!, msoFalse, msoScaleFromTopLeft
' .ScaleHeight 1.48!, msoFalse, msoScaleFromTopLeft
Question 1: If I leave the scaling instructions in, AND leave the
cursor in one of the generated text boxes, AND generate a second text
box, it comes out wider than the first one. If I put the insertion
point someplace outside of the first textbox, and then generate a
second one, it comes out the same width as the first. By expanding
the widths in the AddTextBox call and commmenting out the ScaleWidth
statements, this behavior went away.
Question 2: My users report (and I have seen this myself, but very
seldom, and not in the last 6 weeks or so) that occasionally when they
generate one of these text boxes, it ends up on the screen extremely
wide and narrow - extending way, way beyond the right side of the
slide. This is not a freely reproducible phenomenon - anybody know
what's going on there?