+ Reply to Thread
Results 1 to 2 of 2

E-mailing Attachments

  1. #1
    Forum Contributor
    Join Date
    09-02-2005
    Posts
    146

    E-mailing Attachments

    At the end of my form, the user presses a button that activates the SendMail method sending the workbook to us. I'd like them to also be able to send an attachment Zip file with the document.

    I know it can be done using a code similar to this:

    Please Login or Register  to view this content.
    However said code requires a reference to Outlook which causes problems depending on what system it is being filled out on.

    Are there any other methods availible to send attachments that require program referances?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello wilro85,

    You can use CDO instead of SendMail or Outlook. CDO doesn't display any security warnings and will work with any machine. The email is sent using the machine's STMP service. Have a look at Ron De Bruin's page...

    Send an Email with CDO

    To send an attachment, use the .AddAttachment statement. Place the file path and name to the right of the statement. You can not use relative file paths. Place this before the .Send statement of your code.
    Please Login or Register  to view this content.
    To send more than one file, add more .AddAttachment statements.

    Sincerely,
    Leith Ross

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1