Ms Word : Macro : resize image

 ..


'CentimetersToPoints(), InchesToPoints

Sub abc()
    Dim shp As Word.Shape
    Dim ishp As Word.InlineShape
    If Word.Selection.Type <> wdSelectionInlineShape And _
        Word.Selection.Type <> wdSelectionShape Then
        Exit Sub
    End If
    If Word.Selection.Type = wdSelectionInlineShape Then
        Set ishp = Word.Selection.Range.InlineShapes(1)
        ishp.LockAspectRatio = False
        ishp.Height = InchesToPoints(1.78)
        ishp.Width = InchesToPoints(3.17)
    Else
        If Word.Selection.Type = wdSelectionShape Then
            Set shp = Word.Selection.ShapeRange(1)
            shp.LockAspectRatio = False
            shp.Height = InchesToPoints(1.78)
            shp.Width = InchesToPoints(3.17)
        End If
    End If
End Sub




..


ความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้

CASIO fx-5800P : การ mod ด้วยเครื่องคิดเลข

sgsBB(SGS-Score Inserter) : โปรแกรมช่วยกรอกผลคะแนนจาก bookmark51 ใส่ระบบ SGS ของ สพฐ.

springMVC : เชื่อมต่อฐานข้อมูล mySQL ด้วย JDBC-Template