General information
Category:
COM/DCOM and OLE Automation
Hello:
I am running an application in several machines. Every one use Win2k and MSOffice 2000. The application uses an automation to send Emails to different destinataries. The fact is, this feature works in some computers, but in others release a error message. The error message said:
"Error#1429-OLE IDispatch execption code 4096 from Microsoft Outlook: Outlook doesn't recognize one or more names...- Outlook doesn't recognize one or more names."
Any idea about this?
The code used to send emails is:
[
oItem.subject=ALLTRIM(Thisform.txtsubject.Text)&&"Policy Services: "+VarReport
oitem.HTMLbody = VarContent
IF NOT EMPTY(VarAttachment )
IF RIGHT(ALLTRIM(VarAttachment ),1) = '\'
tx=ADIR(GDir,VarAttachment+"*.*")
FOR tw=1 TO tx
oAttachment = oItem.Attachments.Add(VarAttachment+GDir(tw,1))
NEXT tw
ELSE
oAttachment = oItem.Attachments.Add(VarAttachment)
ENDIF
ENDIF
IF thisform.lstEMailTo.ListCount>0
FOR ty=1 TO thisform.lstEMailTo.ListCount
oitem.Recipients.Add(thisform.lstEMailTo.ListItem(ty))
NEXT ty
ELSE
oemail=null
return(.f.)
ENDIF
IF thisform.lstEMailCC.ListCount>0
FOR ty=1 TO thisform.lstEMailCc.ListCount
VarCc = VarCc+";"+thisform.lstEMailCc.ListItem(ty)
NEXT ty
VarCc=substr(VarCc,2)
oitem.CC = VarCc
ENDIF
IF thisform.lstEMailBCC.ListCount>0
FOR ty=1 TO thisform.lstEMailBCc.ListCount
VarBCc = VarBCc+";"+thisform.lstEMailBCc.ListItem(ty)
NEXT ty
VarBCc=substr(VarBCc,2)
oitem.BCC = VarBcc
ENDIF
oitem.Send
oEmail=null
thisform.Release()
]
Thanks
Efrain Contreras
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only