How to set different signatures for replies and forwards in Outlook?
Normally, you can set different signatures for different accounts in your Outlook, but, have ever tried to apply different signatures for replies and forwards. It means, when you reply an email, the signature1 is inserted, when you forward an email the signature2 is applied. How could you solve this task in Outlook?
Set different signatures for replies and forwards with VBA code
Set different signatures for replies and forwards with VBA code
The following VBA code can help you to set different signatures for replies and forwards, please do with below steps one by one:
1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.
2. Then, click Insert > Module, copy and paste below code into the opened blank module, see screenshot:
VBA code: Set different signatures for replies and forwards:
Public WithEvents GExplorer As Outlook.Explorer
Public WithEvents GMail As Outlook.MailItem
Public GFSO As Scripting.FileSystemObject
Public GTextStream As Scripting.TextStream
Public GText As String
Private Sub Application_Startup()
Set GExplorer = Outlook.Application.ActiveExplorer
Set GFSO = New Scripting.FileSystemObject
End Sub
Private Sub GExplorer_SelectionChange()
Dim xItem As Object
On Error Resume Next
Set xItem = GExplorer.Selection.Item(1)
If xItem.Class <> olMail Then Exit Sub
Set GMail = xItem
End Sub
Private Sub GMail_Reply(ByVal Response As Object, Cancel As Boolean)
InsertSignature Response, "Signature1.htm" 'change this signature name for replies
End Sub
Private Sub GMail_Forward(ByVal Forward As Object, Cancel As Boolean)
InsertSignature Forward, " Signature2.htm" 'change this signature name for forwards
End Sub
Private Sub InsertSignature(Item As Object, SignName As String)
Dim xSignatureFile As String
Dim xMailItem As Outlook.MailItem
xSignatureFile = CreateObject("WScript.Shell").SpecialFolders(5)
xSignatureFile = xSignatureFile & "\Microsoft\Signatures\" & SignName
Set GTextStream = GFSO.OpenTextFile(xSignatureFile)
GText = ""
GText = GTextStream.ReadAll
If Item.Class <> olMail Then Exit Sub
Set xMailItem = Item
With xMailItem
.Display
.HTMLBody = .HTMLBody & "<br><br>" & GText
End With
End Sub
Note: In the above code, Signature1 and Signature2 are the two signature names that you want to use for replying and forwarding. Please change the names to your need.
3. Still in the Microsoft Visual Basic for Applications window, click Tools > References to go to the References-Project1 dialog box, and check Microsoft Scripting Runtime option from the Available References list box, see screenshot:
4. And then click OK to close the dialog, from now on, when you reply an email, Signature1 will be inserted at once, see screenshot:
And when you forward a message, Signature2 will be inserted as following screenshot shown:
Best Office Productivity Tools
Kutools for Outlook - Over 100 Powerful Features to Supercharge Your Outlook
π€ AI Mail Assistant: Instant pro emails with AI magic--one-click to genius replies, perfect tone, multilingual mastery. Transform emailing effortlessly! ...
π§ Email Automation: Out of Office (Available for POP and IMAP) / Schedule Send Emails / Auto CC/BCC by Rules When Sending Email / Auto Forward (Advanced Rules) / Auto Add Greeting / Automatically Split Multi-Recipient Emails into Individual Messages ...
π¨ Email Management: Easily Recall Emails / Block Scam Emails by Subjects and Others / Delete Duplicate Emails / Advanced Search / Consolidate Folders ...
π Attachments Pro: Batch Save / Batch Detach / Batch Compress / Auto Save / Auto Detach / Auto Compress ...
π Interface Magic: πMore Pretty and Cool Emojis / Boost Your Outlook Productivity with Tabbed Views / Minimize Outlook Instead of Closing ...
π One-click Wonders: Reply All with Incoming Attachments / Anti-Phishing Emails / πShow Sender's Time Zone ...
π©πΌβπ€βπ©π» Contacts & Calendar: Batch Add Contacts From Selected Emails / Split a Contact Group to Individual Groups / Remove Birthday Reminders ...
Over 100 Features Await Your Exploration! Click Here to Discover More.