VBA and Mail
I don't think so, but if you are using Outlook, then the signatures are
stored in a file in an MS directory (mine are in C:\Documents and
Settings\Bob\Application Data\Microsoft\Signatures). For instance, if you
named the signature mySig, then you will have mySig.txt, mySig.htm, and
mySig.rtf in there. You could open one of those files, read the signature
and include it in your string that you set to the Body or HTMLBody
properties.
For example, to get the data
Dim sSignature As String
Dim sData As String
Dim sFilename As String
Dim iFreefile As Long
sFilename = "C:\Documents and Settings\Bob\Application
Data\Microsoft\Signatures\mySig.txt"
iFreefile = FreeFile
Open sFilename For Input As iFreefile
Do While Not EOF(iFreefile)
Line Input #iFreefile, sData
sSignature = sSignature & vbnewlijne & sData
Loop
Close iFreefile
:
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Mike" wrote in message
...
I've got a script that generates e-amil for me. Everything works fine,
but I
want to add a signature. Is there some way to have the script use a
premade
signature or template? Here's the script.
With objMail
' .BCC = jr3411
.To = ADDY$
.Subject = oSheet.Cells(4, 3).Value & " - " & oSheet.Cells(1, 2).Value
&
" - " & oSheet.Cells(5, 3).Value
.Body = MSG$ & vbCrLf & vbCrLf & cKt$
.Display
End With
|