Insert Transparent .PNG Signature to Workbook?

ascalise

New Member
Joined
Oct 8, 2015
Messages
21
Is this possible? Have a few templates I'm looking to add dynamic signatures to from a dropdown and save to .PDF instead of printing, manually signing and scanning in. I have signature images in PNG format that I'm looking to overlay over the signature line.

I've looked into the INSERT>SIGNATURE functionality built into Excel but it lacks the flexibility I require.

I already saw that I can insert and place/format pictures with the following code from a local directory (as PicPath):

VBA Code:
With xlApp.ActiveSheet.Pictures.Insert(PicPath)
    With .ShapeRange
        .LockAspectRatio = msoTrue
        .Width = 75
        .Height = 100
    End With
    .Left = xlApp.ActiveSheet.Cells(i, 20).Left
    .Top = xlApp.ActiveSheet.Cells(i, 20).Top
    .Placement = 1
    .PrintObject = True
End With
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
What is wrong with the code you provided? I had to adjust it slightly for the fact that it is incomplete, but other than that it seems to work ok.

VBA Code:
Sub AddImagePNG()
    Dim PicPath As String
    PicPath = "E:\TransparentPicturePath.png"
    With Application.ActiveSheet.Pictures.Insert(PicPath)
        With .ShapeRange
            .LockAspectRatio = msoTrue
            .Width = 75
            .Height = 100
        End With
        .Left = ActiveSheet.Cells(2, 2).Left
        .Top = ActiveSheet.Cells(2, 2).Top
        .Placement = 1
        .PrintObject = True
    End With
End Sub

I've looked into the INSERT>SIGNATURE functionality built into Excel but it lacks the flexibility I require.
Also, what flexibility do you require that the inbuilt option lacks?
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top