Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert Users Default Signature

Status
Not open for further replies.

tamer64

IS-IT--Management
Aug 27, 2007
120
US
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, that worked out great!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top