+ Reply to Thread
Results 1 to 6 of 6

Outlook Signature

  1. #1
    Forum Contributor
    Join Date
    05-14-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    155

    Outlook Signature

    Dear Experts,
    I am using following code to create outlook email from excel but as in my outlook signature is set, it is not appearing same. How to do please help

    im OutApp As Object, OutMail As Object

    'Create PDF of active sheet only
    strPath = Environ$("temp") & "\" 'Or any other path, but include trailing "\"

    strFName = ThisWorkbook.Path & ActiveWorkbook.Name
    strFName = ActiveSheet.Range("k9").Value & ".pdf"

    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, filename:= _
    strPath & strFName, Quality:=xlQualityStandard, _
    IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
    Set objOutlook = CreateObject("Outlook.Application")
    Set objMail = objOutlook.CreateItem(0)

    With objMail
    .Display
    End With
    signature = objMail.body
    With objMail
    .To = "[email protected]"
    .CC = "[email protected]"
    .Subject = "Document Release Request - " & Range("K9").Value
    .body = "Dear DMG" & "," & vbNewLine & _
    vbNewLine & _
    "Please Process the document as per attached document Request Form, native & signed file are available in the following path." & vbNewLine & _
    vbNewLine & _
    "Kindly acknowledge the same after process." & _
    vbNewLine & _
    vbNewLine & signature

    .Attachments.Add strPath & strFName
    '.Display 'Use only during debugging ##############################
    '.Send 'Uncomment to send e-mail ##############################
    End With

    Set objOutlook = Nothing
    Set objMail = Nothing

    Thanks in advance,
    Rajeev
    Rajeev Kumar

  2. #2
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: Outlook Signature

    Hi,
    2 remarks, delete your email addresses in your post, now you are fishing for spam.
    Pur your code between code tags pls.
    Forum rule 2
    2. Programming code must be enclosed in code tags to improve readability. (A, Z)
    Please Login or Register  to view this content.
    (or use the # button)
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    05-14-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    155

    Re: Outlook Signature

    Dear Experts,
    I am using following code to create outlook email from excel but as in my outlook signature is set, it is not appearing same. How to do please help

    im OutApp As Object, OutMail As Object

    'Create PDF of active sheet only
    strPath = Environ$("temp") & "\" 'Or any other path, but include trailing "\"

    strFName = ThisWorkbook.Path & ActiveWorkbook.Name
    strFName = ActiveSheet.Range("k9").Value & ".pdf"

    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, filename:= _
    strPath & strFName, Quality:=xlQualityStandard, _
    IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
    Set objOutlook = CreateObject("Outlook.Application")
    Set objMail = objOutlook.CreateItem(0)

    With objMail
    .Display
    End With
    signature = objMail.body
    With objMail
    .To = ""
    .CC = ""
    .Subject = "Document Release Request - " & Range("K9").Value
    .body = "Dear DMG" & "," & vbNewLine & _
    vbNewLine & _
    "Please Process the document as per attached document Request Form, native & signed file are available in the following path." & vbNewLine & _
    vbNewLine & _
    "Kindly acknowledge the same after process." & _
    vbNewLine & _
    vbNewLine & signature

    .Attachments.Add strPath & strFName
    '.Display 'Use only during debugging ##############################
    '.Send 'Uncomment to send e-mail ##############################
    End With

    Set objOutlook = Nothing
    Set objMail = Nothing

    Thanks in advance,

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Outlook Signature

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)

  5. #5
    Forum Contributor
    Join Date
    05-14-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    155

    Re: Outlook Signature

    Sorry to say that i dont understand what is wrong with my post.
    Simply I have asked my query and i am getting to change change and change.

  6. #6
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Outlook Signature

    Dont know how you managed to get past 100 posts and not know what the rules are or where they can be found

    please read the forum rules listed here
    https://www.excelforum.com/forum-rul...rum-rules.html

    with reference to why you are getting the response you are getting..read rule #2
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA adding default outlook signature to an outlook html message
    By jlive24 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-11-2018, 11:59 AM
  2. [SOLVED] Outlook signature
    By alaboudy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2017, 10:12 AM
  3. [SOLVED] Get Default Signature of outlook
    By naveenmarapaka in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-24-2014, 08:17 AM
  4. Signature on Outlook VBA
    By lauren04 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-18-2013, 04:52 PM
  5. outlook signature formatted
    By michel71 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-26-2011, 08:28 PM
  6. Add outlook signature to MailEnvelop
    By efernandes67 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-07-2011, 06:15 AM
  7. Getting Outlook To Add Default Signature
    By McNulty in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-13-2009, 01:17 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1