A
azzzanetti
To automatically create a mail with an attachments I've always used
this code:
Dim allegati As Outlook.Attachment
Set OutLk = CreateObject("Outlook.Application")
Set email = OutLk.CreateItem(0)
With email
..Subject = "Subject"
..Body = "Body"
Set allegati = .Attachments.Add("c:\test.txt")
..Display
End With
Set email = Nothing
Set OutLk = Nothing
I use this code since 2-3 years ago, I have the references included in
the project and the only problem is that with Wista it doesn't work
and I get this error: "Object dosent support this property or method"
I use Outlook2003, if I try the same code with another PC with WinXP
or Win2000 everything works fine.
Thank you.
this code:
Dim allegati As Outlook.Attachment
Set OutLk = CreateObject("Outlook.Application")
Set email = OutLk.CreateItem(0)
With email
..Subject = "Subject"
..Body = "Body"
Set allegati = .Attachments.Add("c:\test.txt")
..Display
End With
Set email = Nothing
Set OutLk = Nothing
I use this code since 2-3 years ago, I have the references included in
the project and the only problem is that with Wista it doesn't work
and I get this error: "Object dosent support this property or method"
I use Outlook2003, if I try the same code with another PC with WinXP
or Win2000 everything works fine.
Thank you.