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

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
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,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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