Attaching files to email in access

  • Thread starter Thread starter Neil White
  • Start date Start date
N

Neil White

Hi I'm a complete novice with access and only have a few days experience

I have written a database to keep track of AutoCAD drawings as new revisions
come out and that all seems fine

what I want to do is to have a button that will automatically attach the
drawing specified in that entry and open a email so I can email it straight
out!

and the second part is,
that I want to automatically record that it has been sent so I can look back
when an new revised drawing comes in I can see who I sent the previous
version to!

thanks in advance for any help

if you need me to email the register I would be happy to do that

Neil
 
Hello Neil

I did this once in Access 97 using Outlook, like this.
My form contained the path (BackupFolder) and filename
(BackupZipFile) of a zipped file, and there was a
button "email file" with code attached on the Click event
of the button.

The code reads

Dim RetVal as Variant
Dim FileName as String
Dim RunCommand as String

Me!BackupZipFile = ReplaceString(Me!
BackupZipFile, " ", "_") (probably because I had problems
with filenames containing spaces)

FileName = Me!BackupFolder & Me!BackupZipFile

ON error resume next

RunCommand = "C:\Program Files\Microsoft
Office\Office\SENDFILE.EXE" & " " & FileName

RetVal = Shell(RunCommand, vbMaximizedFocus)

It still works!
Give it a bash, hope this helps.
Jess
 
Back
Top