Outlook--Making an Attachment Name the Message Subject


When someone attaches a file to my custom form, how can I have Outlook automatically use the filename as the subject for the message?

Outlook 2000 added an AttachmentAdd event, which earlier versions don't have. Add the code in Listing 1 to your form to have it automatically set the subject to the name of the first attachment added, unless the user has already entered something in the Subject box.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.