3

我在 Word 中创建了一个文本 bo,我想在其中插入文本:

Sub k()
Dim Box As Shape
Set Box = ActiveDocument.Shapes.AddTextbox( _
Orientation:=msoTextOrientationHorizontal, _
Left:=50, Top:=50, Width:=100, Height:=100)
//HOW TO INSERT HERE TEXT INTO TEXT BOX


End Sub
4

1 回答 1

4

这是解决方案:

Sub k()
    Dim Box As Shape
    Set Box = ActiveDocument.Shapes.AddTextbox( _
        Orientation:=msoTextOrientationHorizontal, _
        Left:=50, Top:=50, Width:=100, Height:=100)

        'The solution for you:
        Box.TextFrame.TextRange.Text = "My text comes this way"

End Sub
于 2013-06-15T18:19:08.033 回答