zoukankan      html  css  js  c++  java
  • 在word中输入任意角度旋转图片

    Sub 图片旋转任意角度()
    Dim sha As Shape, isa As InlineShape
        Static s As Integer
        Application.ScreenUpdating = 0
       s = InputBox("请输入要旋转的角度:", "图像旋转", s)
    
        If ActiveDocument.Range.InlineShapes.Count > 0 Then
            For n = 1 To ActiveDocument.Range.InlineShapes.Count '还可使用count to 1 step-1和for each
                With ActiveDocument.Range.InlineShapes(n).ConvertToShape
                    .Rotation = s
                    s = .Rotation
            .PictureFormat.Brightness = 0.36  '这两句放于前面会出错,转换inlineshape对象失败
               .PictureFormat.Contrast = 0.73
                    .ConvertToInlineShape
                End With
            Next
         ElseIf ActiveDocument.Shapes.Count > 0 Then
                For n = 1 To ActiveDocument.Shapes.Count
                    ActiveDocument.Shapes(n).LockAspectRatio = msoTrue
                    ActiveDocument.Shapes(n).PictureFormat.Brightness = 0.36
                    ActiveDocument.Shapes(n).PictureFormat.Contrast = 0.73
                    ActiveDocument.Shapes(n).Rotation = s
                    s = ActiveDocument.Shapes(n).Rotation
                Next
        End If
    TT:
    If Err.Number > 0 Then ActiveDocument.Undo 1
     Application.ScreenUpdating = 1
    End Sub
    

     软件下载:

     https://wwx.lanzoux.com/im3gaieitze

    https://www.cnblogs.com/zhanglei1371/p/9259071.html

  • 相关阅读:
    C语言第四章
    C第三章,指代数据
    DES+MD5加密
    时间选择器
    百度地图定位
    Httputils请求网络数据
    xStream解析xml文件
    pulltorefresh
    slidingmenu的应用
    Duutils创建数据库
  • 原文地址:https://www.cnblogs.com/zhanglei1371/p/9259071.html
Copyright © 2011-2022 走看看