B
Bruce Cooley
Using PowerPoint 2002 with SP3, I have two presentations with identical
slide layouts bot different text in the textboxes. I want to copy formatted
text from a textbox on my source presentation to the same textbox on my
range presentation. I can do it manually with no problem.
I tried various methods but I always got an extra blank line in the textbox.
I finally found a way to avoid the extra line, but my current code adds
ephemeral dotted-line rectangles around most, but not all, of the textranges
I paste into. It doesn't matter whether the new text is larger or smaller
than the textbox they are being pasted into. They are not your usual
selection dotted lines. They disappear when I grab any anchor and adjust
the size. Not only that, they remain when I undo the operation and the text
reverts to what it was before. Does anyone have any idea what these are,
why they appear, and how I can make them not appear?
Looping through slides in my target presentation....
Looping through shapes....
With .Shapes(c)
If .Name = "KnowByDem1" Then
.TextFrame.TextRange.Characters.Copy
With TC.Slides(8).Shapes("KnowByDem1").TextFrame ' TC is
the source presentation
.DeleteText
.TextRange.InsertAfter.Paste
End With
End If
If I use InsertBefore, or if I copy the textrange but not the characters, I
get the extra blank line at the bottom of the target textbox. All I really
want to do is create an exact replica of what was in the other box. Why am
I having such a hard time doing it in VBA? What am I missing? The macro
recorder is not helping at all.
Thanks in advance,
Bruce
slide layouts bot different text in the textboxes. I want to copy formatted
text from a textbox on my source presentation to the same textbox on my
range presentation. I can do it manually with no problem.
I tried various methods but I always got an extra blank line in the textbox.
I finally found a way to avoid the extra line, but my current code adds
ephemeral dotted-line rectangles around most, but not all, of the textranges
I paste into. It doesn't matter whether the new text is larger or smaller
than the textbox they are being pasted into. They are not your usual
selection dotted lines. They disappear when I grab any anchor and adjust
the size. Not only that, they remain when I undo the operation and the text
reverts to what it was before. Does anyone have any idea what these are,
why they appear, and how I can make them not appear?
Looping through slides in my target presentation....
Looping through shapes....
With .Shapes(c)
If .Name = "KnowByDem1" Then
.TextFrame.TextRange.Characters.Copy
With TC.Slides(8).Shapes("KnowByDem1").TextFrame ' TC is
the source presentation
.DeleteText
.TextRange.InsertAfter.Paste
End With
End If
If I use InsertBefore, or if I copy the textrange but not the characters, I
get the extra blank line at the bottom of the target textbox. All I really
want to do is create an exact replica of what was in the other box. Why am
I having such a hard time doing it in VBA? What am I missing? The macro
recorder is not helping at all.
Thanks in advance,
Bruce