Trying to add my signature into the Macro

PatrickWW

Board Regular
Joined
Jun 7, 2013
Messages
135
Here is what I have so far. This is for Outlook

Don't laugh at my code :)

HTML:
Sub Email()

    Dim OutApp As Object
    Dim OutMail As Object
    Dim strbody As String
  
    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)

    
    
    Addresses = ActiveWorkbook.ActiveSheet.Range("B14").Value   ''Reference the email address in the workbook
    
    WorkPlease = Split(Range("B12").Value, " ")(0)  
    
    Filename = Split(ActiveWorkbook.Name, ".")(0)  
    

    On Error Resume Next
    With OutMail
        .Display
        .to = Addresses
        .CC = ""
        .BCC = ""
        .Subject = Filename & " " & "Pricing"
        .HTMLBody "<FONT color=#000000 face=Calibri size=3.5>" & WorkPlease & "," & "</td>"  
         .Attachments.Add ActiveWorkbook.FullName  '' The attachments it pulls in
         .Display
    End With
    
    On Error GoTo 0
     Set OutMail = Nothing
    Set OutApp = Nothing


End Sub
 
Last edited:

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,225,666
Messages
6,186,316
Members
453,349
Latest member
neam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top