UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
> Signature Add, Office 2010    
 
   
arun.ms0910
post Jun 19 2019, 06:34 AM
Post#1



Posts: 19
Joined: 19-June 19



Hi Frnds,
How to add signature in outlook using excel vba.HelpMe.. iconfused.gif
Go to the top of the page
 
 
Start new topic
Replies
ADezii
post Jun 19 2019, 07:39 AM
Post#2



Posts: 2,641
Joined: 4-February 07
From: USA, Florida, Delray Beach


  1. Outlook Signatures need to have been previously created and they exist in a specific location on your Hard Drive. They also exist in three different Formats, namely: *.txt, *.rtf, and *.htm.
  2. The following Code will:
    1. Create an Instance of Outlook using Early Binding.
    2. Create a simple Mail Item with basic Arguments supplied.
    3. Open a specific Signature File (Work_Signature.htm) in the Default Path.
    4. Specify some Text in the Body (HTMLBody) of the E-Mail, then append the Signature.
    5. Display the E-Mail for review.

    CODE
    Dim appOutLook As Outlook.Application
    Dim MailOutLook As Outlook.MailItem
    Dim strSignature As String
    Dim strBody As String

    Set appOutLook = New Outlook.Application
    Set MailOutLook = appOutLook.CreateItem(olMailItem)

    strBody = "Here is information regarding our new Vice President of Operations"

    Open (Environ("appdata") & "\Microsoft\Signatures\Work_Signature.htm") For Input As #1
    strSignature = Input(LOF(1), #1)

    With MailOutLook
      .To = "JohnDoe@Mail.com"
      .Subject = "Some Subject"
      .HTMLBody = strBody & "<br><br>" & strSignature & "<br>"
         .Display
    End With

    Close #1
  3. Hope this helps.
Go to the top of the page
 
arun.ms0910
post Jun 21 2019, 04:46 AM
Post#3



Posts: 19
Joined: 19-June 19



Thank you ADezii.its working.. thanks.gif
Go to the top of the page
 
ADezii
post Jun 21 2019, 05:37 AM
Post#4



Posts: 2,641
Joined: 4-February 07
From: USA, Florida, Delray Beach


yw.gif
Go to the top of the page
 

Posts in this topic



Custom Search


RSSSearch   Top   Lo-Fi    21st September 2019 - 04:22 AM