[RESOLVED] Subject message not passing to outlook window from VB6.0
Hello,
I have my own mail template in vb6.0.
when i click on send button it creates a new outlook 2007 window. all information passes to it except subject message. on my local machine it is working but on client side not.
Thanks,
krunal
Re: Subject message not passing to outlook window from VB6.0
Re: Subject message not passing to outlook window from VB6.0
Are you shelling a string with the mailto format or using some mail clients object model?
Re: Subject message not passing to outlook window from VB6.0
I am passing all the values from my rich text box to outlook object window. all the values are passing except Subject.
Here is the function code :
Public Function SendOutLookEmail(ByVal strSender As String, _
ByVal strRecipient As String, _
ByVal strSubject As String, _
ByVal strbody As String, _
Optional ByVal strCc As String, _
Optional ByVal strBcc As String, _
Optional ByVal colAttachments As Collection _
) As Boolean
Dim OutApp As Object
Dim OutMail As Object
Dim attachment
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
If Len(strRecipient) <> 0 Then
OutMail.To = strRecipient
Else
OutMail.To = ""
End If
If Len(strBcc) <> 0 Then
OutMail.BCC = strBcc
Else
OutMail.BCC = ""
End If
OutMail.Subject = strSubject
OutMail.HTMLBody = strbody
'OutMail.Attachments.Add (strFileName)
'If Trim(ICSFilePath & "") <> "" Then
' OutMail.Attachments.Add (ICSFilePath)
'End If
If Not colAttachments Is Nothing Then
For Each attachment In colAttachments
OutMail.Attachments.Add (attachment)
Next
End If
OutMail.Display
On Error GoTo err_msg
Set OutMail = Nothing
Set OutApp = Nothing
SendOutLookEmail = True
Exit Function
err_msg:
MsgBox err.Number & vbCrLf & "Error from Functions.SendOutLookEmail" & vbCrLf & err.Description, vbInformation, "Langserv"
SendOutLookEmail = False
On Error Resume Next
End Function
Re: Subject message not passing to outlook window from VB6.0
Do that other fields get passed correctly body, to, etc to Outlook?
Re: Subject message not passing to outlook window from VB6.0
Yes,
All other information like to,cc,bcc, body text, attachments are passed correctly except Subject.
They are also using outlook 2007 same as us. but only client side is not working.
Re: Subject message not passing to outlook window from VB6.0
Hi all,
thanks a ton for you labor to look into this issue. but my client had deleted subject data from DB table. so they were not getting subject line.:mad:
Issue is resolved now.
Thank
Re: Subject message not passing to outlook window from VB6.0
Another Emily Litella thread. :bigyello:
Quote:
What is all this fuss I hear about the Supreme Court decision on a "deaf" penalty? It's terrible! Deaf people have enough problems as it is!
At least it is resolved.
Re: Subject message not passing to outlook window from VB6.0
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.