picture export

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to utilize a picture phone so my technicians can take photos, of
their completed work, and send them via e-mail back to my local office.
Because of the large number of techs and the size of the pics. I would write
a rule for each or create their own e-mail address on our servers so each one
has their own folder to save to. I would than write a macro to delete all
pics at the end of the day or every couple of days depending on storage
space. But what I can't figure out is how to automate the process of pulling
the .jpg file out of the e-mail and sending it to an Excel file with the
ability to open the pic in Excel using some sort of object handler or
another application link.
 
Am Sat, 7 Jan 2006 17:33:02 -0800 schrieb Tomkat743:

First you need to save the the attachment as a file (call its SaveAsFile
method). Excel isn´t able to open a jpg directly but you can add it as a
Shape, e.g. (assuming that ws has a ref on a Worksheet already):

Sub test()
Dim ws As Worksheet
Dim sh As Shapes
Dim picsh As Shape
Dim file As String

file = "D:\CIMG0787.JPG"

Set sh = ws.Shapes
Set picsh = sh.AddPicture(file, msoFalse, msoTrue, 1, 1, 100, 100)

End Sub
 
Back
Top