Outlook only allow you to specify a single signature for both Replies and Forwards. If you wish to use different signatures based on whether you reply or forward, you can use the way introduced in this article.
In Outlook signature editor, you can find that you’re permitted to assign a specific signature to both Replies and Forwards. In other words, you cannot use Outlook native feature to specify different signatures for replies and forwards. Therefore, if you want to let Outlook automatically insert different signatures in replies and forwards, you can resort to VBA codes. Here we will introduce you how to realize it in quick time.
Auto Insert Different Signatures based on Whether You Reply or Forward an Email
- At the very beginning, start your Outlook program as normal.
- Then press “Alt + F11” key buttons in Outlook main window.
- Next you will get into the VBA editor window in success.
- Subsequently, you need to double click the “ThisOutlookSession” project on the left side.
- And then copy and paste the following VBA codes into it.
Public WithEvents objExplorer As Outlook.Explorer Public WithEvents objMail As Outlook.MailItem Public strSignatureFile As String Public objFileSystem As Object Public objTextStream As Object Public strText As String Private Sub Application_Startup() Set objExplorer = Outlook.Application.ActiveExplorer Set objFileSystem = CreateObject("scripting.FileSystemObject") End Sub Private Sub objExplorer_SelectionChange() On Error Resume Next Set objMail = objExplorer.Selection.Item(1) End Sub Private Sub objMail_Reply(ByVal Response As Object, Cancel As Boolean) Dim objReply As Outlook.MailItem 'Access the specific signature file 'Change the path to the specific signature file as per your actual case strSignatureFile = CStr(Environ("USERPROFILE")) & "\AppData\Roaming\Microsoft\Signatures\Test John Smith.htm" 'Read the specific signature file Set objTextStream = objFileSystem.OpenTextFile(strSignatureFile) strText = objTextStream.ReadAll Set objReply = objMail.Reply With objReply 'Add the specific signature .HTMLBody = strText & .HTMLBody .Display End With Cancel = True End Sub Private Sub objMail_Forward(ByVal Forward As Object, Cancel As Boolean) Dim objForward As Outlook.MailItem strSignatureFile = CStr(Environ("USERPROFILE")) & "\AppData\Roaming\Microsoft\Signatures\Johnny.htm" Set objTextStream = objFileSystem.OpenTextFile(strSignatureFile) strText = objTextStream.ReadAll Set objForward = objMail.Forward With objForward .HTMLBody = strText & .HTMLBody .Display End With Cancel = True End Sub
- After that, you need to digitally sign the new VBA project as usual.
- Later, change your Outlook macro settings to allow digitally signed macros.
- Then, you can restart your Outlook to activate the new VBA project.
- Ultimately, you can have a try.
Select an email from the mail list and then hit “Reply” button under the “Home” tab. At once, a reply email will display, in which a signature will be inserted like the followings.
Select an email and click on “Forward” button. The forwarding email will pop up with a different signature like the following image:
Note: But this method has a shortcoming: If the signature contains an image, the image will not be displayed, like the picture below:
Deal with Annoying PST Errors
Like documents in MS Word, workbooks in MS Excel, PST files in MS Outlook are vulnerable too. Hence, it is pretty common for you to encounter PST errors. Thus, it is prudent and wise to prepare a reputable and reliable PST recovery tool, such as DataNumen Outlook Repair, such that you can salvage your compromised PST data as soon as possible.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including corrupted SQL Server and outlook repair software products. For more information visit www.datanumen.com