Skip to Content
0
Former Member
Mar 30, 2009 at 11:15 AM

SAP OLE to Word Usage of Text Boxes & Arrow Diagrams

159 Views

hi this my Macro recording in MS word How to use this as sap Code using SAP OLE

' Macro recorded 3/30/2009 by Nirmala
'
    ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, 216#, _
        72#, 108#, 54#).Select
    Selection.ShapeRange.TextFrame.TextRange.Select
    Selection.Collapse
    Selection.TypeText Text:="Hma"
    Selection.ShapeRange.Select
    ActiveDocument.Shapes.AddLine(207#, 135#, 261#, 207#).Select
    Selection.ShapeRange.Line.EndArrowheadStyle = msoArrowheadTriangle
    Selection.ShapeRange.Line.EndArrowheadLength = msoArrowheadLengthMedium
    Selection.ShapeRange.Line.EndArrowheadWidth = msoArrowheadWidthMedium
    Selection.ShapeRange.Flip msoFlipHorizontal
    ActiveDocument.Shapes.AddLine(261#, 135#, 306#, 198#).Select
    Selection.ShapeRange.Line.EndArrowheadStyle = msoArrowheadTriangle
    Selection.ShapeRange.Line.EndArrowheadLength = msoArrowheadLengthMedium
    Selection.ShapeRange.Line.EndArrowheadWidth = msoArrowheadWidthMedium
    ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, 153#, _
        216#, 90#, 54#).Select
    Selection.ShapeRange.TextFrame.TextRange.Select
    Selection.Collapse
    Selection.TypeText Text:="xys"
    Selection.ShapeRange.Select
    ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, 297#, _
        207#, 81#, 63#).Select
    Selection.ShapeRange.TextFrame.TextRange.Select
    Selection.Collapse
    Selection.TypeText Text:="lop"