I have successfully added an "Email" button to a form for contacts in an access table. It uses the OnClick Event property to call an embedded macro called "EmailDatabaseO bject" which creates a blank email message to the selected contact. How can I automatically have my custom Outlook Signature appear in the message text of the email? Can anyone give me some guidance on how best to do this? Thanks.
Code:
Private Sub CmdEmail_Click()
On Error GoTo CmdEmail_Click_Err
Dim DAustinName As String
DAustinName = "Daryl Austin"
.Font.Bold = True
'********
' _AXL:<?xml version="1.0" encoding="UTF-16" standalone="no"?>
' <UserInterfaceMacro For="delrec" xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application" xmlns:a="http://schemas.microsoft.com/office/accessservices/2009/11/forms"><Sta
' _AXL:tements><Action Name="OnError"/><Action Name="GoToControl"><Argument Name="ControlName">=[Screen].[PreviousControl].[Name]</Argument></Action><Action Name="ClearMacroError"/><ConditionalBlock><If><Condition>Not [Form].[NewRecord]</Condition><Statem
' _AXL:ents><Action Name="DeleteRecord"/></Statements></If></ConditionalBlock><ConditionalBlock><If><Condition>[Form].[NewRecord] And Not [Form].[Dirty]</Condition><Statements><Action Name="Beep"/></Statements></If></ConditionalBlock><ConditionalBlock><If
' _AXL:><Condition>[Form].[NewRecord] And [Form].[Dirty]</Condition><Statements><Action Name="UndoRecord"/></Statements></If></ConditionalBlock><ConditionalBlock><If><Condition>[MacroError]<>0</Condition><Statements><Action Name="MessageBox"><Argume
' _AXL:nt Name="Message">=[MacroError].[Description]</Argument></Action></Statements></If></ConditionalBlock></Statements></UserInterfaceMacro>
Call DoCmd.SendObject(ObjectName:="", OutputFormat:="", _
To:=[E-mail], Cc: "", Bcc:="", _
Subject:=DAustinName & Chr(10) & _
"Sr. Sales Manager" & Chr(10) & _
"" & Chr(10) & _
"BetterBuilt" & Chr(10) & _
"Division of Northwestern Systems Corp" & Chr(10) & _
"Tel. nnn-nnn-nnnn" & Chr(10) & _
"Fax nnn-nnn-nnnn" & Chr(10) & _
"Cell nnn-nnn-nnnn" & Chr(10) & _
"Eml. xxxxxxx@xxxxxxxxxxxxxxx.com", _
EditMessage:=True, _
TemplateFile:="")
CmdEmail_Click_Exit:
Exit Sub
CmdEmail_Click_Err:
MsgBox Error$
Resume CmdEmail_Click_Exit
End Sub
Comment