-
Mark,
OK, let see if this will be more relevant for You:
[vba]
Option Explicit
Sub Add_Sig()
Const stPFile As String = "c:\Sign.htm"
Dim olApp As Outlook.Application
Dim olItem As Outlook.MailItem
Set olApp = New Outlook.Application
Set olItem = olApp.CreateItem(olMailItem)
With olItem
.Recipients.Add ("bill@xltest.com")
.Subject = "To Mark"
.HTMLBody = Read_Sign(stPFile)
'.Save
.Display
'.Send
End With
Set olItem = Nothing
Set olApp = Nothing
End Sub
Private Function Read_Sign(ByVal stFile As String) As String
Dim fso As Scripting.FileSystemObject
Dim tso As Scripting.TextStream
Set fso = New Scripting.FileSystemObject
Set tso = fso.GetFile(stFile).OpenAsTextStream(1, -2)
Read_Sign = tso.ReadAll
tso.Close
Set tso = Nothing
Set fso = Nothing
End Function
[/vba]
This is a revised version of a recent post at Dick Kusleika's blog Daily Dose of Excel.
If it works then give Dick the credit and not me 
Take care and all the very best from,
Dennis
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules