Consulting

Results 1 to 6 of 6

Thread: Solved: Reply keeping the body of text and Adding new line

  1. #1

    Cool Solved: Reply keeping the body of text and Adding new line

    I was wondering if there is a way I can set a Macro to reply to an email message with the following conditions

    1. Keep the body of the email I am replying to

    2. CC a same group from my contacts everytime I run the Macro

    3. Ad a standard response in the body

    4. Ad a standard subject line to my response




    Local Time: 12:48 PM
    Local Date: 06-16-2006
    Location:

  2. #2
    Knowledge Base Approver
    The King of Overkill!
    VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    Hello,

    Welcome to VBAX! You should be able to do what you're looking for by using:[vba]Sub jaureguimaReply()
    Dim iMsg As Object 'MailItem
    Set iMsg = Application.ActiveExplorer.Selection.Item(1)
    With iMsg.Reply
    With .Recipients.Add("YourContactDistributionGroupName")
    .Type = olCC
    .Resolve
    End With
    .Subject = "4. Ad a standard subject line to my response"
    .Body = iMsg.Body & vbCrLf & "3. Ad a standard response in the body"
    .Display 'or .Send
    End With
    Set iMsg = Nothing
    End Sub[/vba]Matt

  3. #3

    Thanks

    Every thing is good but it still will not post the standard message in the body....Thanks for your help

  4. #4
    Knowledge Base Approver
    The King of Overkill! VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    Ok.. it is possible your emails have an HTML body instead of just plain text.. make the following change, should do what you're looking for:[vba]' .Body = iMsg.Body & vbCrLf & "3. Ad a standard response in the body"
    If Len(.HTMLBody) > 0 Then
    .HTMLBody = iMsg.HTMLBody & vbCrLf & "3. Ad a standard response in the body"
    Else
    .Body = iMsg.Body & vbCrLf & "3. Ad a standard response in the body"
    End If[/vba]If still no good, can you please give me an example of what you're looking for? What this does currently is paste your Standard Response below the original message body.. if you're looking for it reversed then switch iMsg.(html)Body and "3. Ad a standard response in the body"

  5. #5

    We are good!

    Figured it out my message was coming out at the bottom of the email. I just rearranged it.

  6. #6
    Thanks!!!

Posting Permissions

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