Attachments.Add DisplayName property?

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

Guest

I am attaching a document to an email in access 97 using Outlook Automation.
My code works fine attaching the document located at strDocumentLocation.
However, I want to rename the attachment something else (strDocumentName) but
I can't seem to get that to work. An abbreviated version of the code I am
using is:

strDocumentLocation = "C:\Temp\DocumentLocation.doc"

strDocumentName = "DocumentName"

Set objAttach = objMail.Attachments.Add(strDocumentLocation, 1, ,
strDocumentName)

When my email is displayed, the attachment is there but is called
"DocumentLocation.doc" instead of "DocumentName".


Any help is greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top