tonymaclennan
08-12-2005, 10:38 AM
My program sends an email with an attatchment ut and works fine on my computer, but when I created the installation file, and used it on a different computer, an error occurreed (attatched).
Any ideas?
Most likely it's missing the nessecary dependancies. What references are you using?
tonymaclennan
08-19-2005, 07:49 AM
All dependancies were automatically added by the installer Wizard.
What dependancies should I add for Mail ?
Well, it's a COM exception, so is it safe to assume you are automating outlook? Like I said, I need to know the references you are using to know for sure. If it is outlook automation, does the user have Outlook?
tonymaclennan
08-20-2005, 10:13 AM
The user does have Outlook Express.
I use the following code:
Try
Dim Mail As New System.Web.Mail.MailMessage
mail.To = EmailSendSpeadSheetsTo
Mail.From = UserEmailAddress
Mail.Subject = EmailSubjectSpreadsheets
Mail.Body = EmailBodySpreadsheets
Dim attachment As New System.Web.Mail.MailAttachment(Location of Attatchment)
Mail.Attachments.Add(attachment) 'add the attachment
System.Web.Mail.SmtpMail.SmtpServer = EmailSMTPServer
System.Web.Mail.SmtpMail.Send(Mail)
'send email to user now
btnSendEmail.Enabled = False
Catch
lblEmailStatus.Text = "An error occurred when sending the email."
btnSendEmail.Enabled = True
End Try
The error seems to escape the 'Catch'.
I will post the dependencies currently being used soon as they are on a dif comp at a diff house.
Outlook and Outlook Express are two different programs. Outlook Express is the version that comes free with windows, Outlook is part of Microsoft Office which you have to buy. Outlook Express cannot be automated while Outlook can.
In any case though, it doesn't seem like you are using Outlook automation, so I'll just see about those dependancies.
tonymaclennan
08-21-2005, 09:29 AM
The following dependencies are sued in the installation package:
ADODB.dll
EXCEL.EXE
interpol.excel.dll
interpol.microsoft.office.core.dll
microsoft.stdformat.dll
microsoft.vbe.interpol.dll
microsoft.visualbasic.compatibility.data.dll
microsoft.visualbasic.compatibility.dll
MSDATASRC.dll
MSO.dll
office.dll
stdole.dll
I have Outlook Express but not Microsoft Outlook on the computer the error appeared on.
After reading that, i asked another web user to try it, and the email was successfully sent.
hmm...well it looks like although you aren't using Microsoft Outlook, you are Using Microsoft Excel which is also a part of microsoft office. Since Microsoft Outlook is a basic part of Microsoft Office and you said the user didn't have it, I'm guessing he doesn't have Microsoft Excel either. I bet you that's your problem. If possible, try to install Microsoft Office on the users computer, see if it works after that.
tonymaclennan
08-22-2005, 06:58 AM
The user does not have Microsoft Office on this computer.
Following your reply, I tested the section that creates the Excel file, and the same error appears.
It seems you have found the source of the prob. I need to install Office.
Thanks for your help.