View Single Post
 
Old 07-20-2011, 03:09 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Peter,

I'm unable to replicate the errors you're getting with either Word 2003 or Word 2010. Try this variant:
Code:
Sub Demo()
Dim Shp As Shape, Rng As Range
Set Rng = Selection.Range
Selection.Copy
Selection.Collapse
Set Shp = ActiveDocument.Shapes.AddCallout(Type:=msoCalloutOne, _
        Left:=100, Top:=40, Width:=150, Height:=75)
With Shp
  .TextFrame.TextRange.PasteSpecial DataType:=wdPasteText
  .Anchor.Cut
  Selection.Paste
  .WrapFormat.Type = wdWrapSquare
  .RelativeVerticalPosition = wdRelativeVerticalPositionParagraph
  .Top = 0
End With
Rng.Select
End Sub
Note: Since textboxes default to the 'Normal' Style, pasting as unformatted text should achieve the same result as pasting formatted text then applying the Style.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote