When trying to use Microsoft Outlook in an app I get an 'Automation Error. The specified module could not be found' error. Here is the code:
Any help would be appreciated. thanks.
Code:
Function SendOutlookMessage(ByVal sSubject As String, _
ByVal sBody As String, ByVal sSendTo As String, _
ByVal bShowOnly As Boolean, _
Optional ByVal sAttachmentFileName As String = "") As Boolean
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment
' Create the Outlook session.
Set objOutlook = New Outlook.Application 'this is where the error is created
end function
Any help would be appreciated. thanks.