My Assistant
![]()
Custom Search
|
![]() ![]() |
![]() |
![]() Post#1 | |
![]() Posts: 120 Joined: 29-April 08 From: North Florida, USA ![]() | I am copying JPG images from Outlook attachments within an Access application I have developed. I am saving the .JPG files to C:\ drive and would like to add text, such as the date and user comment, to the bottom of the image when I save the file. blockquote> With oMessage.Attachments .Item(iCtr).SaveAsFile "C:\" & .Item(iCtr).FileName End With Looking forward to any suggestions or sample code on how to do this? Thank you in advance any help that is offered. HighwayRob |
![]() Post#2 | |
![]() UdderAccess Admin + UA Ruler Posts: 19,557 Joined: 27-April 02 From: Upper MI ![]() | If mean you mean to actually embed the text as part of the image, have you tried using MS Paint? There is no easy code to do that. |
![]() Post#3 | |
![]() UtterAccess Editor Posts: 16,339 Joined: 27-June 06 From: England (North East / South Yorks) ![]() | You're doing this in Access? Stephen Lebans' beyond awesome Image control work should more than lend a hand... Image Class / Picture Box here. |
![]() Post#4 | |
![]() UdderAccess Admin + UA Ruler Posts: 19,557 Joined: 27-April 02 From: Upper MI ![]() | OOh . . . Leigh - that is a clever find. Now I gotta set some time aside and test it out in A2K7/10. ighwayrob - what version of Access are you using? |
![]() Post#5 | |
![]() Posts: 120 Joined: 29-April 08 From: North Florida, USA ![]() | I am in Access 2007 with Visual Basic 6.5 I have downloaded and I am testing Stephen Lebans code...looks promising. I am going to import the modules into my project and see if I can get it to fly! UtterAccess is the true source for real answers to Access challenges. Rob |
![]() Post#6 | |
![]() UdderAccess Admin + UA Ruler Posts: 19,557 Joined: 27-April 02 From: Upper MI ![]() | Rob - would love to see your final solution for this. |
![]() Post#7 | |
![]() Posts: 120 Joined: 29-April 08 From: North Florida, USA ![]() | Here is the condensed version of the code that ended up working. Oinstalled ImageMagick and used the 'convert.exe' program. Oddly, it does not accept spaces in the comment I am adding, a problem I will someday get back to and fix. localfname = "C:\orig.jpg" newlocalfname = "C:\new.jpg tempComment = Format(Now, "Short Date") & "Comment_goes_here" cmdString = PicDir & "convert " & localfname & " -background Khaki label:'" & tempComment & "' -gravity Center -append " & newlocalfname Screen.MousePointer = 11 Call Shell(cmdString, vbNormalFocus) |
![]()
Custom Search
|
![]() | Search Top Lo-Fi | 5th December 2019 - 07:40 PM |