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:
3. After inserting the signature, go on clicking Developer > Design This Form in the new Meeting window, see screenshot:
4. In the new screen, click Developer > Publish > Publish Form As, see screenshot:
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:
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:
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
Next
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 }\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
xMeetingItem.Save
xMailItem.Close olDiscard
End If
Next
End If
End Sub
Private Sub PackBytes(ByteArray() As Byte, ByVal PostData As String)
ByteArray() = StrConv(PostData, vbFromUnicode)
End Sub
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:
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.