I know this can be done with Excel VBA:
Worksheets("SheetName").ChartObjects(1) _
.Chart.Export _
FileName:="YourChartName.gif", FilterName:="GIF"
I am not sure how to call this Excel VBA from Access though, unless you create the chart programatically, then open Excel programatically, then use an autoexec macro that spits out the image to a folder, then finish the process by having Access pull the image in programatically.
BTW, even though Access has the capability to store images, I usually store the images in a network folder, then link the images to records based on the name of the image (for example, prefix the image names with the SSN of the patient) and then display a thumbnail of the image programatically. It keeps the Access file size small. Stored images will really bloat your Access app quickly.
HTH
mmcdonal
|