CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004
    Posts
    9

    Need help to include Auto Signature & Group Mail ID in sending mail through VB

    Hi,

    I am sending mail through VB Excel Macro with the following code and it is working fine.

    1.However in "To" field I would like use Group under which I have already defined Mail ID's to whom I want to send the mail.

    For eg. I have created a Group as "Adi" as shown below and used in my To field,but it is not sending the mails.

    If I directly hard code all the Mail ID's under this group in the To field below,mail goes successfully.

    2.I would like to use Auto signature facility of Outlook while sending my mails using code below.It has been set in Outlook but when mail goes through this code,Auto Signature doesn't come.

    Is there something like .Signature property which can be used or is there any other method to achieve the desired results.



    Dim objOutlook As Object
    Dim objOutlookMsg As Object
    Set objOutlook = CreateObject("Outlook.Application")
    Set objOutlookMsg = objOutlook.CreateItem(0)
    With objOutlookMsg
    .To = "Adi"
    .Cc = "hdagar@csc.com"
    .Subject = "Model Office '" + OD1 + "' Cycle Details " + OD + " (Cycle Date : " + BWG + ") - " + OD3
    .Body = "Please find MO '" + OD1 + "' cycle details in the spreadsheet attached below. This cycle was run on " + OD + " with cycle date of " + BWG + "." + vbCrLf + vbCrLf + vbCrLf + _
    "All the files mentioned in the request form have been NDMed." + vbCrLf + vbCrLf + vbCrLf + "Pre-cycle and Post-cycle backups:" + vbCrLf + vbCrLf + "KKMP.U8AILMP" + OD1 + ".VBKP.BEFORE.DAILY.C" + aDate1 + vbCrLf + _
    "KKMP.U8AILMP" + OD1 + ".VBKP.AFTER.DAILY.C" + aDate1
    .Attachments.Add (Path)
    .Send 'Let´s go!
    End With
    Set objOutlookMsg = Nothing
    Set objOutlook = Nothing

  2. #2
    Join Date
    Jan 2013
    Posts
    1

    Re: Need help to include Auto Signature & Group Mail ID in sending mail through VB

    Hi there

    Your post is pretty old, have you found a solution yet? Because I'm looking for the exact same two things right now.

    Thank you, regards
    vantoe

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

Featured