B
Bakshi
The reference is Microsoft CDO 1.21 Library.
--Source Code Begiin---
Imports Microsoft.VisualBasic
Imports System.IO
Imports System.Text
Imports Microsoft.Win32
Imports System
Imports System.Management
Imports System.Collections.ObjectModel
Imports MAPI
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim objSession As MAPI.Session
Dim MailBox As MAPI.Messages
Dim InMessage, fwdMessage As MAPI.Message
Dim recp
objSession = CreateObject("MAPI.Session")
objSession.Logon(ProfileName:="admin",
ProfilePassword:="al1234_BB")
MailBox = objSession.Inbox.Messages
InMessage = MailBox.GetFirst
fwdMessage = InMessage.Forward //Getting Exception here..
Recp = fwdMessage.Recipients.Add
Recp.Name = "(e-mail address removed)"
Recp.Resolve()
fwdMessage.Send()
objSession.Logoff()
objSession = Nothing
End Sub
End Class
--Source Code End---
Exception : MAPI_E_UNKNOWN_ENTRYID(80040201)
How to overcome this problem?
Thanks
--Source Code Begiin---
Imports Microsoft.VisualBasic
Imports System.IO
Imports System.Text
Imports Microsoft.Win32
Imports System
Imports System.Management
Imports System.Collections.ObjectModel
Imports MAPI
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim objSession As MAPI.Session
Dim MailBox As MAPI.Messages
Dim InMessage, fwdMessage As MAPI.Message
Dim recp
objSession = CreateObject("MAPI.Session")
objSession.Logon(ProfileName:="admin",
ProfilePassword:="al1234_BB")
MailBox = objSession.Inbox.Messages
InMessage = MailBox.GetFirst
fwdMessage = InMessage.Forward //Getting Exception here..
Recp = fwdMessage.Recipients.Add
Recp.Name = "(e-mail address removed)"
Recp.Resolve()
fwdMessage.Send()
objSession.Logoff()
objSession = Nothing
End Sub
End Class
--Source Code End---
Exception : MAPI_E_UNKNOWN_ENTRYID(80040201)
How to overcome this problem?
Thanks