Note: The other languages of the website are Google-translated. Back to English
Log in  \/ 
Register  \/ 


How to automatically insert signature to Outlook meeting requests?

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

Kutools for Outlook - Brings 100 Advanced Features to Outlook, and Make Work Much Easier!

  • Auto CC/BCC by rules when sending email; Auto Forward Multiple Emails by custom; Auto Reply without exchange server, and more automatic features...
  • BCC Warning - show message when you try to reply all if your mail address is in the BCC list; Remind When Missing Attachments, and more remind features...
  • Reply (All) With All Attachments in the mail conversation; Reply Many Emails in seconds; Auto Add Greeting when reply; Add Date into subject...
  • Attachment Tools: Manage All Attachments in All Mails, Auto Detach, Compress All, Rename All, Save All... Quick Report, Count Selected Mails...
  • Powerful Junk Emails by custom; Remove Duplicate Mails and Contacts... Enable you to do smarter, faster and better in Outlook.
shot kutools outlook kutools tab 1180x121
shot kutools outlook kutools plus tab 1180x121
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Laszlo · 1 years ago
    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
  • To post as a guest, your comment is unpublished. · 2 years ago
    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