Hello,
I have been searching the internet for sometime nowand cannot find solutions to my problems. I have the code below which generatesand email for me which works great! But I am just perhaps being picky about acouple items and hoping maybe someone can provide a solution to them?
I would likethe beginning of my paragraph to be intended. I have been trying to find somecode online that works like tab does but no luck. I tried <p> and I understandthis is used for starting a paragraph but it intends the entire email. I justwant a few spaces starting with I am including . I want to keep the HTMLformatting. Does anyone know of a solution for adding more spaces with HTML?
Second, mydefault signature is added but it creates extra spaces after the body of myemail down to the signature line. This is not being created from my defaultsignature, there are no additional spaces there. I understand when you add yoursignature to an outlook email there are already spaces added which one wouldnormally type through. Since the body is being added to the email there aremore spaces between the body and signature line then are needed. Anyway toremove spaces or additional lines?
Thank youkindly!!
[/FONT][/COLOR]
I have been searching the internet for sometime nowand cannot find solutions to my problems. I have the code below which generatesand email for me which works great! But I am just perhaps being picky about acouple items and hoping maybe someone can provide a solution to them?
I would likethe beginning of my paragraph to be intended. I have been trying to find somecode online that works like tab does but no luck. I tried <p> and I understandthis is used for starting a paragraph but it intends the entire email. I justwant a few spaces starting with I am including . I want to keep the HTMLformatting. Does anyone know of a solution for adding more spaces with HTML?
Second, mydefault signature is added but it creates extra spaces after the body of myemail down to the signature line. This is not being created from my defaultsignature, there are no additional spaces there. I understand when you add yoursignature to an outlook email there are already spaces added which one wouldnormally type through. Since the body is being added to the email there aremore spaces between the body and signature line then are needed. Anyway toremove spaces or additional lines?
Thank youkindly!!
Code:
[FONT=Times New Roman][SIZE=3][COLOR=#000000][/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000]Sub Email ()[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] Dim OutApp As Object[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] Dim OutMail As Object[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] Dim strbody As String[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] Dim WS As Worksheet[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] [/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] Set WS = Worksheets("Status")[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] [/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000]Application.ScreenUpdating= False[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000]Application.EnableEvents= False[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] [/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] Set OutApp =CreateObject("Outlook.Application")[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] Set OutMail = OutApp.CreateItem(0)[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] [/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] On Error Resume Next[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] With OutMail[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] .Display[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] .To = WS.range("V5").value[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] .CC = W.range("H16").value[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] .BCC = ""[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] .subject = "**Closing - "& WS.range("d4").value & " - " &WS.range("c13").value & " - " &WS.range("AB4").value & "**"[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] .HTMLBody = "<pstyle='font-family:calibri;font-size:14.5'>" & _[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] "Hi " &WS.range("ab9").value & "," &"<br></p>" & _[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] "<pstyle='font-family:calibri;font-size:14.5'>" & "I am includingthe documents for this file as well as additional items that had beenrequested. Please email me directly with any questions you may have."& _[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000]"</p>"& OutMail.HTMLBody[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] .Display [/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] End With[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] On Error GoTo 0[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000][FONT=Calibri][COLOR=#000000]
[/COLOR][/FONT][/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] Set OutMail = Nothing[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] Set OutApp = Nothing[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000] [FONT=Times New Roman][SIZE=3][COLOR=#000000][FONT=Calibri][COLOR=#000000]
[/COLOR][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/FONT]
[FONT=Calibri][COLOR=#000000] Application.ScreenUpdating = True[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000]
[/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000]Application.EnableEvents= True[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000][FONT=Calibri][COLOR=#000000][FONT=Times New Roman][SIZE=3][COLOR=#000000][FONT=Calibri][COLOR=#000000]
[/COLOR][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/FONT][/COLOR][/SIZE][/FONT]
[FONT=Calibri][COLOR=#000000]End Sub[/COLOR][/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000][/COLOR][/SIZE][/FONT]
[COLOR=#222222][FONT="Verdana"]
[/FONT][/COLOR]