Imports System.Net Imports Microsoft.Office.Interop.Outlook Imports Microsoft.Office.Interop Public Function OutlookCall() Dim pdfFile As String = "c:\Quotations\Quotation for #" & Session("QType").ToString + " " + Session("CustEnqID").ToString & ".pdf" 'Take an instance of the Outlook App Dim oOutlook As New Outlook.Application() ' Create an instance of the MailItem Dim oMailitem As Outlook.MailItem ' Create an instance of the Attachment Dim oAttach As Outlook.Attachment oMailitem = oOutlook.CreateItem(Outlook.OlItemType.olMailItem) oMailitem.To = Session("EmailID").ToString oMailitem.CC = "abc@abc.com" oMailitem.Subject = "Quotation from Abc Pvt. Ltd." oMailitem.Body = "Please download an Attachment for quotation requested Abc Pvt. Ltd." 'txtFilepath is a text box that contains the path for attachment. 'Attach the file Path to the Mail Item oMailitem.Attachments.Add(pdfFile) 'PING….Displays the Outlook along with the To,Cc,Subject and Attachment oMailitem.Display() End Function
Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80070005.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)