+ Reply to Thread
Results 1 to 4 of 4

How to set a default signature in my Macro

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    01-11-2016
    Location
    Brazil
    MS-Off Ver
    2010
    Posts
    125

    How to set a default signature in my Macro

    Hey guys, i want to set my macro to always send an email with the SAME signature. For example, the default signature is "rito@bra.com", then, if Paul runs the macro and sends the email on his outlook account, the signature will be "rito@bra.com", and not his signature. Here is the code:

     Sub email()
    
    Dim OApp As Object, OMail As Object, signature As String
    Set OApp = CreateObject("Outlook.Application")
    Set OMail = OApp.CreateItem(0)
    With OMail
    .Display
    End With
    signature = OMail.HTMLBody
    With OMail
    '.To = "someone@somedomain.com"
    '.Subject = "Type your email subject here"
    '.Attachments.Add
    .HTMLBody = "Add body text here" & vbNewLine & signature
    '.Send
    End With
    Set OMail = Nothing
    Set OApp = Nothing
    
    End Sub
    How can i do this? Is there a way to set the path?

    Note: Everyone has all the signatures on their machines (in outlook)

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: How to set a default signature in my Macro

    Change this...
    signature = OMail.HTMLBody
    To this...
    signature = "<br>rito@bra.com"
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    01-11-2016
    Location
    Brazil
    MS-Off Ver
    2010
    Posts
    125

    Re: How to set a default signature in my Macro

    i want to get the rito@bra.com signature

  4. #4
    Forum Contributor
    Join Date
    01-11-2016
    Location
    Brazil
    MS-Off Ver
    2010
    Posts
    125

    Re: How to set a default signature in my Macro

    but i want the actual signature, not just the name

+ 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] Default signature at the end of email
    By xlhelp7 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-20-2016, 01:09 AM
  2. Trying to add a default signature into an email from VBA
    By murp5972 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-13-2015, 09:33 AM
  3. [SOLVED] default email signature
    By bigfishprf in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-08-2015, 10:55 AM
  4. [SOLVED] Get Default Signature of outlook
    By naveenmarapaka in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-24-2014, 08:17 AM
  5. Email macro, include variable in body & add default outlook signature
    By promithius in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-13-2013, 09:05 AM
  6. vb code for default user signature
    By cooket4 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-27-2012, 10:04 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