Skip to main content

How to automatically insert signature to Outlook meeting requests?

Author: Xiaoyang Last Modified: 2018-05-03

In Outlook, you can auto insert the signature to emails easily, but, if you want to insert the signature to meeting invitations automatically, there is not direct way for you to solve this task. This article, I will talk about some useful methods to auto insert signature to Outlook meeting requests.

Automatically insert signature to Outlook meeting requests with Custom Form

Automatically insert signature to Outlook meeting requests with VBA code

Automatically insert signature to Outlook meeting requests with Custom Form

In Outlook, you can create a custom form to insert the signature to meeting requests automatically, please do as this:

1. Please navigate to the Calendar window, and click Home > New Meeting to open the new Meeting window.

2. Then click Insert > Signature, and choose a signature you want to insert, see screenshot:

doc auto insert sig to meeting 1

3. After inserting the signature, go on clicking Developer > Design This Form in the new Meeting window, see screenshot:

doc auto insert sig to meeting 2

4. In the new screen, click Developer > Publish > Publish Form As, see screenshot:

doc auto insert sig to meeting 3

5. In the popped out Publish Form As dialog box, type a name into the Display name text box, and then click Publish button, see screenshot:

doc auto insert sig to meeting 4

6. And then, close the current meeting window without saving it.

7. From now on, when you want to create a new meeting with signature, please click Home > New Items > Custom Forms, and then select the form you have created just now. And the signature is inserted into the meeting body automatically, see screenshot:

doc auto insert sig to meeting 5

Automatically insert signature to Outlook meeting requests with VBA code

The below VBA code also can help you to auto insert a signature to meeting requests, please do with the following steps:

1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. In the Microsoft Visual Basic for Applications window, double click ThisOutlookSession from the Project1(VbaProject.OTM) pane to open the module, and then copy and paste the following code into the blank module.

VBA code: Automatically insert signature to meeting requests:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim xMeetingItem As Outlook.MeetingItem
Dim xFSO As Scripting.FileSystemObject
Dim xSignStream, xWriteStream, xReadStream As Scripting.TextStream
Dim xSignFld, xSignSubFld As Scripting.Folder
Dim xSignFile As Scripting.File
Dim xSignText, xSignPath As String
Dim xMailRTFText, xMeetingRTFText, xAllRTFText As String
Dim xByte() As Byte
Dim xPos As Integer
Dim xFilePath, xFldPath, xFldName As String
Dim xMailItem As MailItem
On Error Resume Next
If Item.Class = olMeetingRequest Then
    Set xMeetingItem = Item
    Set xFSO = CreateObject("scripting.FileSystemObject")
    xSignPath = CStr(Environ("USERPROFILE")) & "\AppData\Roaming\Microsoft\Signatures\"
    Set xSignFld = xFSO.GetFolder(xSignPath)
    If xSignFld.SubFolders.Count <> 0 Then
        For Each xSignSubFld In xSignFld.SubFolders
            xFldName = xSignSubFld.Name
            xFldPath = xSignSubFld.Path
    End If
    For Each xSignFile In xSignFld.Files
        If xFSO.GetExtensionName(xSignFile.Path) = "htm" Then
            Set xSignStream = xFSO.OpenTextFile(xSignFile.Path)
            xSignText = xSignStream.ReadAll
            If InStr(xSignText, xFldName) <> 0 Then
                xSignText = Replace(xSignText, xFldName, xFldPath)
            End If
            Set xMailItem = Outlook.Application.CreateItem(olMailItem)
            xMailItem.HTMLBody = xSignText
            xMailRTFText = StrConv(xMailItem.RTFBody, vbUnicode)
            xMeetingRTFText = StrConv(xMeetingItem.RTFBody, vbUnicode)
            xPos = InStrRev(xMeetingRTFText, "{\*\htmltag104 </div>}\htmlrtf }\htmlrtf0")
            xFilePath = CreateObject("WScript.Shell").SpecialFolders(16)
            xFilePath = xFilePath & "\MeetingText.txt"
            If xFSO.FileExists(xFilePath) Then
                xFSO.DeleteFile xFilePath
            End If
            Set xWriteStream = xFSO.OpenTextFile(xFilePath, 8, True)
            xMeetingRTFText = Mid(xMeetingRTFText, 1, xPos - 1) & "{\*\htmltag72 </p>}{\*\htmltag0 \par }{\*\htmltag0 \par }" _
            & "{\*\htmltag64 <p class=MsoNormal>}\htmlrtf {\htmlrtf0 {\*\htmltag148 <span lang=EN-US style='color:#00B050'>}\htmlrtf {\htmlrtf0" _
            & "{\*\htmltag244 <o:p>}{\*\htmltag84 &nbsp;}\htmlrtf \'a0\htmlrtf0{\*\htmltag252 </o:p>}" _
            & "{\*\htmltag156 </span>}\htmlrtf }\htmlrtf0 \htmlrtf\par}\htmlrtf0" _
            & vbCrLf & xMailRTFText & vbCrLf & Mid(xMeetingRTFText, xPos, Len(xMeetingRTFText) - xPos + 1)
            xWriteStream.WriteLine xMeetingRTFText
            Set xReadStream = xFSO.OpenTextFile(xFilePath)
            xAllRTFText = xReadStream.ReadAll
            PackBytes xByte, xAllRTFText
            xMeetingItem.RTFBody = xByte
            xMailItem.Close olDiscard
        End If
End If
End Sub
Private Sub PackBytes(ByteArray() As Byte, ByVal PostData As String)
    ByteArray() = StrConv(PostData, vbFromUnicode)
End Sub

doc auto insert sig to meeting 6

3. And then save and close the code window, since then, when you send an outgoing meeting invitation, the specific signature will be inserted automatically. You can go to the Sent Item folder to check the result:

doc auto insert sig to meeting 7

Best Office Productivity Tools

Breaking News: Kutools for Outlook Launches Free Version!

Experience the all-new Kutools for Outlook FREE version with 70+ incredible features, yours to use FOREVER! Click to download now!

🤖 Kutools AI : Instant pro emails with AI magic--one-click to genius replies, perfect tone, multilingual mastery. Transform emailing effortlessly! ...

📧 Email Automation: Auto Reply (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: Recall Emails  /  Block Scam Emails by Subjects and Others  /  Delete Duplicate Emails  /  Advanced Search  /  Consolidate Folders ...

📁 Attachments ProBatch Save  /  Batch Detach  /  Batch Compress  /  Auto Save   /  Auto Detach  /  Auto Compress ...

🌟 Interface Magic: 😊More Pretty and Cool Emojis   /  Remind you when important emails come  /  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 ...

Instantly unlock Kutools for Outlook with a single click—permanently free. Don't wait, download now and boost your efficiency!




Comments (2)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Dear Supporter,

Regarding to VBA "hack", in Outlook365 does not insert the default signature at the end of a neither a new meeting nor appointment. What should I change in the code to get it work?

Thank you in advance.

Best regards: Laszlo
This comment was minimized by the moderator on the site
What lines do I need to change to get this to work on my own profile? I've added the string to my signature location.
Automatically Insert Signature To Outlook Meeting Requests With VBA Code
There are no comments posted here yet
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations