簡體   English   中英

如何在MS Word 2010中使用宏為圖像着色

[英]How to colorize an image with a macro in MS Word 2010

我還想在Word中的圖像上放置一個略微紅色的透明層,以指示應該刪除它,因為更改欄(使用更改跟蹤時)通常被忽略。

到目前為止,我可以格式化所選的圖像:

Sub FormatPicture()

    Dim inShape As InlineShape
    Set inShape = Selection.InlineShapes(1)

    inShape.LockAspectRatio = msoCTrue
    'equals 16cm
    inShape.Width = "453,9"

End Sub

但是如何給圖像着色?

這對我有用

Dim inShape As InlineShape
    Set inShape = Selection.InlineShapes(1)
    inShape.LockAspectRatio = msoCTrue
       inShape.PictureFormat.ColorType = msoPictureGrayscale
    'equals 16cm
    inShape.Width = "453,9"

您可以使用ColorType玩,我認為inShape.PictureFormat.ColorType = msoPictureWatermark會滿足您的需求

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM