zoukankan      html  css  js  c++  java
  • word 插入图片222

    我写论文时经常要把所有的图调整成一样大小,使用的都是以下的代码,供参考。至于批量插入图片等功能,因为写论文时从来用不上,也不知道应该弄成什么样子,所以无法回答你。

    Sub 一次性调整公式以外的图片大小及格式()
           '功能 1 :把全文的图片调整成同样大小,公式除外
           '功能 2 :如果图片不是 jpg 格式的,统一调整成 jpg 格式并居中,以减小文档体积
           '========================
           Mywidth = 7 '需要的图片宽度(厘米)
           Myheigth = 5 '需要的图片高度(厘米)
           '========================
           Dim myPic As InlineShape
       For Each myPic In ActiveDocument.InlineShapes
           With myPic
                   .Select
                   Select Case .Type
                   Case wdInlineShapePicture
                           .Height = 28.345 * Myheigth
                           .Width = 28.345 * Mywidth
                           Selection.ParagraphFormat.Alignment =
    wdAlignParagraphCenter
                                             Selection.Cut
                           Selection.PasteSpecial Link:=False,
    DataType:=15, Placement:=wdInLine, DisplayAsIcon:=False
                   End Select
           End With
       Next
    End Sub
  • 相关阅读:
    缓存更新的套路
    return 和 return false 的区别
    TensorFlow函数:tf.truncated_normal
    TensorFlow随机值:tf.random_normal函数
    TensorFlow函数:tf.lin_space
    TensorFlow函数:tf.ones_like
    TensorFlow函数:tf.ones
    TensorFlow函数:tf.zeros_like
    Tensorflow函数:tf.zeros
    数据分析常用的python工具和SQL语句
  • 原文地址:https://www.cnblogs.com/Ellen/p/2073878.html
Copyright © 2011-2022 走看看