图中右下角是电子图章,VB代码如下:

Dim shp As Object
Dim DZTZ As String

DZTZ = ThisWorkbook.Path & "\" & "YWTJTZ.JPG"
If Dir(DZTZ) = "" Then
MsgBox "目录下没有电子图章。", vbInformation, "提示"
End If

Set shp = ActiveSheet.Pictures.Insert(DZTZ)
With shp
.Left = ActiveCell.Left + Int((ActiveCell.Width - 40) / 2)
.Top = ActiveCell.Top + Int((ActiveCell.Height - 40) / 2)
.Height = 40
.Width = 40
End With
Set shp = Nothing

posted on 2016-03-08 19:06  绿杨荫里  阅读(275)  评论(0编辑  收藏  举报