Link to home
Start Free TrialLog in
Avatar of ogir
ogir

asked on

I send a attachment in mail on VB and user receives without extension of file.

My problem is that I send a mail within attachment (example: file.doc), the user receives this mail with file but this file without it extension, only "file". The user doesnt knows what type is this file, if is a Word file or a Excel file or other file.

The code of Vb mail:
Me.MAPIMessages1.AttachmentIndex = Me.MAPIMessages1.AttachmentCount

Me.MAPIMessages1.AttachmentType = 0

Me.MAPIMessages1.AttachmentPosition = Me.MAPIMessages1.AttachmentIndex

Me.MAPIMessages1.AttachmentPathName = "c:\sendmail\pedido.doc"

Me.MAPIMessages1.AttachmentName = "Pedido.Doc"

Me.MAPIMessages1.Send

ASKER CERTIFIED SOLUTION
Avatar of setiawan
setiawan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of manojamin
manojamin

try this

            Me.MAPIMessages1.AttachmentName = ""
            ' position must be at the end of the message body - 1, read the help file
            Me.MAPIMessages1.AttachmentPosition = Len(Me.MAPIMessages1.MsgNoteText) - 1

Me.MAPIMessages1.AttachmentPathName = "c:\sendmail\pedido.doc"

'get rid of this
'Me.MAPIMessages1.AttachmentName = "Pedido.Doc"
Avatar of ogir

ASKER

OK