Results 1 to 9 of 9

Thread: [RESOLVED] Subject message not passing to outlook window from VB6.0

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2012
    Posts
    28

    Resolved [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

  2. #2
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,172

    Re: Subject message not passing to outlook window from VB6.0

    code?

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    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?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Oct 2012
    Posts
    28

    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

  5. #5
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Subject message not passing to outlook window from VB6.0

    Do that other fields get passed correctly body, to, etc to Outlook?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Oct 2012
    Posts
    28

    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.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Oct 2012
    Posts
    28

    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.

    Issue is resolved now.

    Thank

  8. #8
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Subject message not passing to outlook window from VB6.0

    Another Emily Litella thread.

    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.

  9. #9
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    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.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width