How do I save an inkPicture as an image using VBA for Excel 2013? -


i creating excel 2013 spreadsheet needs capture client , employee signatures. able add inkpicture controls onto vba form , signature action working. want make after 2 people sign inkpictures on form, signatures saved images on worksheet. after that, code lock worksheet.

i developing on workstation, used on tablets. can see, inkpicture controls don't display on worksheet on non-mobile versions of os (or maybe it's excel?). employer hasn't gotten me tablet yet, can't tell happens on tablet. that's why i'm looking save signatures in image controls on worksheet.

i don't think can use commercial signature packages, can see, these lock entire file, not single worksheets.

i have seen quite few articles around web, seem use vb.net or c#.net , haven't been able translate examples vba. again, issue is: how save inkpicture strokes onto image on worksheet? thanks!

sorry don't have code show here, did work on in office, i'm posting home (yes, on day off).

ok, found out how save signature .gif file. couldn't load image file image control on worksheet. see below how got image onto worksheet. later, decided add image button control instead. here goes...

private sub cmdcontinue_click()     dim imgbytes() byte     dim strfilename string     dim newimg     '     ' real piece missing!     '     imgbytes = inkclient.ink.save(ipf_gif)     '     ' save byte array file     '     strfilename = activeworkbook.path & "\test.gif"     open strfilename binary access write #1     put #1, 1, imgbytes     close #1     '     ' bring image onto sheet, adjust needed     '     activesheet.unprotect password:=strsheetpassword     set newimg = activesheet.pictures.insert(strfilename)     newimg         .top = 100         .left = 1000     end     activesheet.protect password:=strsheetpassword     '     ' code remove saved file goes here     '     '   ...     '     hide     ' hiding form end sub 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -