How do i add My Signature to E-mail with VBA

dewaal99

New Member
Joined
Nov 3, 2011
Messages
22
Hi There Experts

I need some help with Something.

I a make use of the VBA code below to convert my excels worksheet to PDF and then e-mail it.

I need some help i need my e-mail signature to also show. I have made the section where i need the signature bold and red. Hope the info supplied helps.

Please let me know if you need anything else form me.

Thank you

DeWaal

Private Sub CommandButton1_Click()
'Create a PDF and mail of every sheet with a mail address in cell A1 (Sheet5 and sheet6)
'You see that the code create two mails, one with sheet5 and one with sheet6 and send it
'to the address in A1 of that sheet.




'Working only in 2007 and up
Dim sh As Worksheet
Dim TempFilePath As String
Dim TempFileName As String
Dim FileName As String


'Temporary path to save the PDF files
'You can also use another folder like
'TempFilePath = "C:\Users\Ron\MyFolder\"
TempFilePath = "C:\Users\DeWaal @ Mervak\Desktop\"


'Loop through every worksheet
For Each sh In ThisWorkbook.Worksheets
FileName = ""


'Test A1 for a mail address
If sh.Range("C19").Value Like "?*@?*.?*" Then


'If there is a mail address in A1 create the file name and the PDF
TempFileName = TempFilePath & " " & sh.Name & " " _
& ThisWorkbook.Name & " " & ".pdf"


FileName = RDB_Create_PDF(sh, TempFileName, True, False)




'If publishing is OK create the mail
If FileName <> "" Then
RDB_Mail_PDF_Outlook FileName, sh.Range("C19").Value, "Quotation - MVA Aluminium (Pty) Ltd", _
"Hi " & sh.Range("C13").Value _
& vbNewLine & vbNewLine & "Hope all is well." _
& vbNewLine & vbNewLine & "Please find attached your quotation for the glass and aluminium for your site at " & sh.Range("C18").Value _
& vbNewLine & vbNewLine & "Don't hesitate to contact me if there is anything you don't understand or if we can help with anything else." _
& vbNewLine & vbNewLine & "Thank You and Kind Regards" _
& vbNewLine & "(I NEED MY SIGNATURE HERE)", False




'After the mail is created delete the PDF file in TempFilePath
If Dir(TempFileName) <> "" Then Kill TempFileName


Else
MsgBox "Not possible to create the PDF, possible reasons:" & vbNewLine & _
"Microsoft Add-in is not installed" & vbNewLine & _
"The path to Save the file in arg 2 is not correct" & vbNewLine & _
"You didn't want to overwrite the existing PDF if it exist"
End If


End If
Next sh
End Sub
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

dewaal99

New Member
Joined
Nov 3, 2011
Messages
22
Thank you very much for the reply.

I had a look at it, but i don't know how i will be able to make use of his code for my own benefit.

Like i said the code that i currently use works perfect, i just need to add my signature and i am sorted.

Is there a possibility that my code can be adjusted to do this?

Thank you for the help.

DeWaal
 
Upvote 0

Forum statistics

Threads
1,190,783
Messages
5,982,894
Members
439,804
Latest member
melD94

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
Top