返回列表 上一主題 發帖

[發問] 註解內插入圖片

本帖最後由 register313 於 2012-2-3 19:04 編輯

回復 5# dafa

GBKEE版大 所言正確
要在註解顯示的狀態之下才能加入圖片
  1. Sub Macro4()

  2.     Range("A1").Select
  3.     Range("A1").AddComment
  4.     Range("A1").Comment.Visible = False
  5.     Range("A1").Comment.Text Text:="JJSR:" & Chr(10) & ""
  6.   
  7.     Range("A1").Comment.Visible = True             '加入此行 顯示註解
  8.    Range("A1").Comment.Shape.Select True      '加入此行 選取註解

  9.     Range("A1").Comment.Text Text:="JJSR:" & Chr(10) & ""
  10.     Selection.ShapeRange.Fill.Transparency = 0#
  11.     Selection.ShapeRange.Line.Weight = 0.75
  12.     Selection.ShapeRange.Line.DashStyle = msoLineSolid
  13.     Selection.ShapeRange.Line.Style = msoLineSingle
  14.     Selection.ShapeRange.Line.Transparency = 0#
  15.     Selection.ShapeRange.Line.Visible = msoTrue
  16.     Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 0)
  17.     Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
  18.     Selection.ShapeRange.Fill.Visible = msoTrue
  19.     Selection.ShapeRange.Fill.ForeColor.RGB = RGB(255, 255, 255)
  20.     Selection.ShapeRange.Fill.BackColor.SchemeColor = 80
  21.     Selection.ShapeRange.Fill.UserPicture "C:\1.jpg"
  22.    
  23. End Sub
複製代碼

TOP

        靜思自在 : 願要大、志要堅、氣要柔、心要細。
返回列表 上一主題