I am using MS Access 2007. I have a form with a button which creates an instance of outlook. The code works great but would it be possible to modify the code so it would insert the users default mail signature from MS Outlook. Currently users are having to use the insert button in outlook to accomplish this. It would make it easier and one less step for users if this could be accomplished through the script.
Thank You in advance!
[Blue]
Dim Email As String
Dim strEmail, strBody As String
'**create variables for Outlook
Dim objOutlook As Object
Dim objEmail As Object
Dim Fso As FileSystemObject
'***creates an instance of Outlook
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
Set Fso = New FileSystemObject
'***creates string body
strBody = strBody & "Hello" & "," & Chr(13) & Chr(13)
strBody = strBody & "My Text Here."
'***creates and displays email
With objEmail
.to = Email
.Subject = "Employee Attendance" & " " & Date
.Body = strBody
.Display
End With
Set objEmail = Nothing
Exit_Command5124_Click:
Exit Sub
Err_Command5124_Click:
MsgBox Err.Description
Resume Exit_Command5124_Click
[/Blue]
Thank You in advance!
[Blue]
Dim Email As String
Dim strEmail, strBody As String
'**create variables for Outlook
Dim objOutlook As Object
Dim objEmail As Object
Dim Fso As FileSystemObject
'***creates an instance of Outlook
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
Set Fso = New FileSystemObject
'***creates string body
strBody = strBody & "Hello" & "," & Chr(13) & Chr(13)
strBody = strBody & "My Text Here."
'***creates and displays email
With objEmail
.to = Email
.Subject = "Employee Attendance" & " " & Date
.Body = strBody
.Display
End With
Set objEmail = Nothing
Exit_Command5124_Click:
Exit Sub
Err_Command5124_Click:
MsgBox Err.Description
Resume Exit_Command5124_Click
[/Blue]