Hi,
I want to convert my report to a pdf format and send it via email...I'm using the outlook application and i searched for codes to how to send email and got this code:
VB Code:
Dim mOutLookApp As Outlook.Application Dim mNameSpace As Outlook.Namespace Dim mItem As Outlook.MailItem Set mOutLookApp = New Outlook.Application Set mNameSpace = mOutLookApp.GetNamespace("MAPI") mNameSpace.Logon , , False, True Set mItem = mOutLookApp.CreateItem(olMailItem) mItem.To = strEmailAddress mItem.Subject = "This is for you" mItem.HTMLBody = strMessage mItem.Sensitivity = olConfidential mItem.Importance = olImportanceHigh mItem.Send
I got compile error in line one (mOutLookApp )that the user-defined type is not defined!!
How can i solve the problem?!!!
Please help me.![]()




Reply With Quote