creating Attachment -- DisplayName doesn't take my argument

  • Thread starter Thread starter Gordon Prince, MCP
  • Start date Start date
G

Gordon Prince, MCP

I'm using Access 2000 programming to create an Outlook 2003 Contact item. I'm trying to attach an Outlook Task to the Outlook Contact item as follows:

myAttachments.Add myItem, 5, , "New Call Tracking Item"

The attachment shows up ok, but it always has the name of what's in myItem.Subject. I can't get the attachment to display "New Call Tracking Item".

On the google history of this newsgroup I found the following example, which exhibits the same behavior.

why don't you use

.Attachments.Add Source:=NameFile & Dateparm & ".doc",
Type:=olByValue, _
DisplayName:="Document as attachment"
 
AFAIK 2003 does that on purpose - the real file name is always used as a
security feature. This way you cannot present a file named MyLatestVirus.exe
as ReadMe.txt to a user.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

I'm using Access 2000 programming to create an Outlook 2003 Contact item.
I'm trying to attach an Outlook Task to the Outlook Contact item as follows:

myAttachments.Add myItem, 5, , "New Call Tracking Item"

The attachment shows up ok, but it always has the name of what's in
myItem.Subject. I can't get the attachment to display "New Call Tracking
Item".

On the google history of this newsgroup I found the following example, which
exhibits the same behavior.

why don't you use

.Attachments.Add Source:=NameFile & Dateparm & ".doc",
Type:=olByValue, _
DisplayName:="Document as attachment"
 
Back
Top