This may seem pretty simplistic, but I am having a rather difficult time getting 2010 OL to change the default font used to Arial 10. I even added it to my script, but when I run the script, the default font and size comes up as Calibri 11 (which I cannot STAND!). When I manually open a new message, the default font and size comes up as Arial 10 (which is what I want).
Help!
Eventually, I want the .Subject line to reflect the upcoming month and corresponding year. (If the current month is Dec 2013 and I'm working on the Jan 2014 report, this field should reflect 2014 Jan).
Help!
Code:
Sub MemberRep
Dim S As Object
Dim FileExtStr As String
Dim FileFormatNum As Long
Dim TempFilePath As String
Dim TempFileName As String
Dim strbody As String
Dim OutApp As Object
Dim OutMail As Object
Dim SigString As String
Dim Signature As String
' Dim Sourcewb As Workbook
' Dim Destwb As Workbook
' With Application
' .ScreenUpdating = False
' .EnableEvents = False
' End With
On Error Resume Next
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
SigString = Environ("appdata") & "\Microsoft\Signatures\username.htm"
If Dir(SigString) <> "" Then
Signature = GetBoiler(SigString)
Else
Signature = ""
End If
On Error Resume Next
With OutMail
' S = "C:\Documents and Settings\username\Application Data\Microsoft\Signatures\username.htm"
.To = "username@mail.com"
.CC = ""
.BCC = ""
.Subject = "2014" & " Jan" & " - Members Report"
.Paragraph = 0
.HTMLBody = "<font face=Arial size=2>This is strictly for information purposes and requires no action on your part.<br></font><br>" & Signature
.Display
' .Attachments.Add
End With
'Clean up
Set OutMail = Nothing
Set OutApp = Nothing
Set S = Nothing
End Sub
Function GetBoiler(ByVal sFile As String) As String
'Dick Kusleika
Dim fso As Object
Dim ts As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.GetFile(sFile).OpenAsTextStream(1, -2)
GetBoiler = ts.readall
ts.Close
End Function