Hello,
I have a problem with VB5 using RDO component.
I cant compile the project because this error occur "Compiler Error/
Permission denied" in line with rdo command.
What i can do?
Tks
1. 2 vb5 error msgs - Visual Basic/VB
2. Error sending to Exchange 2000 via MAPI and VB5
Hi
I am getting the following return when sending an IPM.Document via VB5
code using MAPI, to a profile on an Exchange 2000 server:
Your message did not reach some or all of the intended recipients
Subject: Staffware work item
Sent: 14/05/04 11:52
The following recipients could not be reached:
dt3bum01 on 14/05/04 11:54
Unable to deliver the message due to a recipient problem
MSEXCH:MSExchangeIS:Coors Brewers Staffware:BBHBLIS1
The code being used to send the message is below:
----------------------------------------------
Private Sub SendWorkItemToUser(ByVal UserID As String, _
ByVal FileName As String, _
ByVal sMsgSubject As String)
' sends the Work Item onto a user
' the MAPI message will contain the field name/values
Const Routine = "SendWorkItemToUser"
On Error GoTo Error_Routine
Dim objSession As MAPI.Session
Dim objMessage As MAPI.Message
Dim objOneRecip As MAPI.Recipient
Dim bAmbig As Boolean
Dim sRecipient As String
1 Set objSession = objThisMessage.Session
2 Set objMessage = objSession.Outbox.Messages.Add
3 AddFieldsToMessage objMessage
4 With objMessage
5 .Subject = sMsgSubject
6 .Text = ReplaceWildcards("Workflow Form Reference
$Reference$")
7 If eExclusions.FormType <> "" Then
8 .Type = eExclusions.FormType
Else
9 .Type = "IPM.Document"
End If
10 AddAttachments objMessage
11 Set objOneRecip = .Recipients.Add
' kd 5/12/1997
' here we used to give it the name
' now we go looking for the actual address
' look in GetRecipAddress
' anh 13/10/98
' GetRecipAddress only works if you search with display
' name. i.e. "Jones, David (Brewers)" rather than
"JonesD3"
' To avoids ambiguous recipient:
' 1. use alias prefix (e.g. MS:BREWERS/BBTESDEV/)
' 2. If still ambiguous then this is because alternatives
' to say "JonesD" are "JonesD1" and "JonesD2". In this
' case, loop through the alternatives looking for the
' exact match. (GetAmbigRecipAddr)
13 sRecipient = gINI_AliasPrefix & UserID
14 With objOneRecip
15 .Name = sRecipient
16 .Type = ActMsgTo
17 .Resolve showDialog:=False
18 If bAmbig Then
19 RaiseEvent Progress("Sending to " & .Address)
Else
20 RaiseEvent Progress("Sending to " & sRecipient)
End If
End With
21 .Update
22 .Send showDialog:=False, savecopy:=False
End With
Exit_Routine:
Exit Sub
Error_Routine:
Select Case Err.Number
Case ActMsgE_AMBIGUOUS_RECIP
Call GetAmbigRecipAddr(UserID, objOneRecip)
bAmbig = True
Resume Next
Case ActMsgE_NOT_FOUND
Debug.Assert False
Err.Raise eBMAError.eMapiUserNotFound, Err.Source & "(" &
Erl & ")", "Unable to resolve address for user " & UserID & ",
Staffware user name and Exchange Name differ"
Case Else
Debug.Assert False
Debug.Print Err.Number, Routine & ":" & Err.Source & "(" &
Erl & ")", Err.Description
Err.Raise Err.Number, Routine & ":" & Err.Source & "(" &
Erl & ")", Err.Description
End Select
End Sub
--------------------------------------
This only fails when sending to a profile on an Exchange 2000 server,
it works fine when sending to Exchange 5.5. When opening the return
message, and clicking send again, the message is sent successfully,
and I can also successfully send emails to the dt3bum01 profile from
Outlook.
The Exchange 2000 server logs show nothing, as if the message isn't
even getting to the server.
Can anyone help?
Many thanks
Rich (change nospam to mlu035 to reply direct)