Add Attachments Programmatically

  • Thread starter Thread starter Alex Davidson
  • Start date Start date
A

Alex Davidson

My company uses a service that allows the sending of faxes via email but I
would like to avoid people having to remember the password that is necessary
so I wrote a macro using the Redemption add-in that prompts for a fax number
and starts a new email as follows:
TO: user@faxservice
SUBJECT: password fax #

Ideally, I would like to be able to allow users to attach documents they
want to send using a Browse button so that they never have to see or touch
the email, thus reducing the risk of ex-employees with a grudge using our
service illegally.

Can anyone point me in the right direction or otherwise tell me it's not
doable?

Thanks,
Alex
 
Once you have your MailItem or SafeMailItem reference you get the
Attachments collection. Then code to add an attachment would be
..Attachments.Add(<file path and name>). You can even display a form
with a common dialog control in it and use that control's methods to
open in a specified directory and with a specified file type
preselected. See the Object Browser help for Attachments.Add for some
sample code for that.
 
Thanks - I have it figured out.
If anyone wants me to share the code let me know.

Alex
 
Back
Top