I have two Signatures but unable to allocate in VBA?

kitsa

Board Regular
Joined
Mar 4, 2016
Messages
111
Office Version
  1. 365
  2. 2016
Hi I have two accounts on my email (outlook) and I would like to use one account and bring up the signature for each account in VBA, each time I run this, the signature doesn't show. Can someone help me with my coding to bring up individual signature e.g. signature name "ScaffTechic"?

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

   strbody = "Hi Accounts," & _
              "<BR />" & "testing& _
              "<BR />" & _
              "<BR />" & _
              "<BR />" & "Note: Testing 2" & _
              "<BR />" & _
              "<BR />" & _
              "<br />" & "If you have any issues please do not hesitate to contact me." & _
              "<br />"

   On Error Resume Next

    With OutMail
       
       .SentOnBehalfOfName = [EMAIL]Test@test.com.au[/EMAIL]
        .Display
        .To = "testing4@doing.com.au"
        .CC = [EMAIL]Testing@do.com.au[/EMAIL]
        .BCC = ""
        .Subject = "test" & " " & Format(Date, "mmmm yyyy") & " " & "Edmondson Park"
        .HTMLBody = "<p style='font-family:calibri;font-size:14.5'>" & strbody & "" & "</p>" & .HTMLBody
        'This is the code which is to send multiple attachments
        .Attachments.Add "Invoice.pdf"
        .Importance = 2 'Or olImprotanceHigh Or olImprotanceLow
        .SendUsingAccount
       .Display
   
    End With
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,214,588
Messages
6,120,409
Members
448,959
Latest member
camelliaCase

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